{"id":20846643,"url":"https://github.com/yohn/bootstrap-form-class","last_synced_at":"2026-04-22T11:32:23.139Z","repository":{"id":50629064,"uuid":"519669501","full_name":"Yohn/Bootstrap-Form-Class","owner":"Yohn","description":"Build a customized HTML form fit for Bootstrap 4 \u0026 5, with floating labels, input groups, or using the grid system.","archived":false,"fork":false,"pushed_at":"2024-07-17T02:06:53.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T21:52:16.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://php-bootstrap-form-class.vercel.app","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yohn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-31T03:18:05.000Z","updated_at":"2024-12-22T23:02:11.000Z","dependencies_parsed_at":"2024-06-25T01:53:01.775Z","dependency_job_id":"6cf750d1-3743-478d-967d-e788fd686794","html_url":"https://github.com/Yohn/Bootstrap-Form-Class","commit_stats":null,"previous_names":["yohn/bootstrap-form-class"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yohn/Bootstrap-Form-Class","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FBootstrap-Form-Class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FBootstrap-Form-Class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FBootstrap-Form-Class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FBootstrap-Form-Class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yohn","download_url":"https://codeload.github.com/Yohn/Bootstrap-Form-Class/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FBootstrap-Form-Class/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32134085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T02:17:16.186Z","updated_at":"2026-04-22T11:32:18.129Z","avatar_url":"https://github.com/Yohn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP-Bootstrap-Form-Class\nBuild your HTML for all your forms fast and easily with a wrapper that builds it for you with only a few variables.\n\nWe can add floating labels, input groups or use the row / col combo to each element.\n\n### Disclaimer\nI have not used the input groups after some recent changes to the class brought about by the floating labels.\n\n## Functions\n95% will return `$this` to make them chain-able.\n### __construct()\nDefault options for the new form() construction.\n````php\n$options = [\n\t\t\t'id'            =\u003e '',  // id of the form element\n\t\t\t'url'           =\u003e '/ajax', // the forms action value\n\t\t\t'method'        =\u003e 'post', // get or post\n\t\t\t'form_classes'  =\u003e 'mf-forms', // classes to be added to the form tag\n\t\t\t'input_classes' =\u003e 'form-control', // classes to be added to the input elements\n\t\t\t'row_classes'   =\u003e 'mb-3', // classes to be added to each container row\n\t\t\t'form_attr'     =\u003e [], // additional form attributes\n\t\t\t'ensure_row'    =\u003e true // ensure the rows are closed before each new element\n\t\t]\n````\n### `-\u003eset_opts($key, $value)`\nYou can override some options originally set by the constructor\nReturns `$this` so it can be chained.\n### `-\u003eget_opts($key)`\nReturns the value of the option key, so cannot be chained.\n### `-\u003eadd_html($html, $close_row=false)`\nAdds additional HTML within the form\n### `-\u003efloating($additional_classes='')`\nTo start a floating label block\n### `-\u003enew_row($row_class='')`\n### `-\u003eset_name($input_name_and_id_value='')`\nYou can put `['key']` in the names value to work with radio and checkboxes.\n\n## Element\nFloating labels are automatically added after the input tag\n````php\n/**\n\t *  @param (str) type = 'input', 'button', 'textarea', 'select', 'file', 'day', 'time':\t\t\n\t * \t@param (str) value of input\n\t *  @param (ary) attr for the input\n\t *  @param (ary) b4_element - input\n\t *  @param (ary) after_element - input\n\t * \n\t * return $this\n\t */\n````\n## Example\n````php\n    $new_form = new form([\n\t\t'id' =\u003e 'register-form',\n\t\t'url' =\u003e '/ajax/register-form',\n\t\t'form_classes' =\u003e 'col-lg-6 mx-auto'\n\t]);\n\t$inc = $new_form\n\t\t-\u003efloating()\n\t\t\t-\u003eset_name('uUsername')\n\t\t\t-\u003eelement('input', '', ['placeholder' =\u003e 'My Crazy Name', 'required' =\u003e 'required'])\n\t\t-\u003eend_floating()\n\t\t-\u003efloating()\n\t\t\t-\u003eset_name('uEmail')\n\t\t\t-\u003eelement('input', '', ['type' =\u003e 'email', 'placeholder' =\u003e 'Real Email', 'required' =\u003e 'required'])\n\t\t-\u003eend_floating()\n\t\t-\u003efloating()\n\t\t\t-\u003eset_name('uPass')\n\t\t\t-\u003eelement('input', '', ['type' =\u003e 'password', 'placeholder' =\u003e 'Password', 'required' =\u003e 'required'])\n\t\t-\u003eend_floating()\n\t\t-\u003efloating()\n\t\t\t-\u003eset_name('uPassCon')\n\t\t\t-\u003eelement('input', '', ['type' =\u003e 'password', 'placeholder' =\u003e 'Confirm Password', 'required' =\u003e 'required'])\n\t\t-\u003eend_floating()\n\t\t-\u003eactions();\n````\n\nMore examples to come soon","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohn%2Fbootstrap-form-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyohn%2Fbootstrap-form-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohn%2Fbootstrap-form-class/lists"}