{"id":15089252,"url":"https://github.com/kartik-v/yii2-widget-activeform","last_synced_at":"2025-04-04T19:13:43.891Z","repository":{"id":23015707,"uuid":"26366548","full_name":"kartik-v/yii2-widget-activeform","owner":"kartik-v","description":"Enhanced Yii2 active-form and active-field with full bootstrap styling support (sub repo split from yii2-widgets).","archived":false,"fork":false,"pushed_at":"2024-08-05T14:05:05.000Z","size":338,"stargazers_count":63,"open_issues_count":5,"forks_count":35,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T18:14:07.887Z","etag":null,"topics":["activefield","activeform","php","yii2-widgets"],"latest_commit_sha":null,"homepage":"http://demos.krajee.com/widget-details/active-form","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kartik-v.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGE.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"open_collective":"yii2-widgets"}},"created_at":"2014-11-08T16:30:51.000Z","updated_at":"2025-01-04T13:04:24.000Z","dependencies_parsed_at":"2024-06-18T11:09:41.829Z","dependency_job_id":"7e54f41c-0143-4f02-aeec-333605cadb35","html_url":"https://github.com/kartik-v/yii2-widget-activeform","commit_stats":{"total_commits":147,"total_committers":16,"mean_commits":9.1875,"dds":"0.11564625850340138","last_synced_commit":"697407c8fa9c81593a7bb9bef4b7ad53f7d38b79"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartik-v%2Fyii2-widget-activeform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartik-v%2Fyii2-widget-activeform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartik-v%2Fyii2-widget-activeform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartik-v%2Fyii2-widget-activeform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kartik-v","download_url":"https://codeload.github.com/kartik-v/yii2-widget-activeform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["activefield","activeform","php","yii2-widgets"],"created_at":"2024-09-25T08:41:50.955Z","updated_at":"2025-04-04T19:13:43.875Z","avatar_url":"https://github.com/kartik-v.png","language":"PHP","funding_links":["https://opencollective.com/yii2-widgets","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=DTP3NZQ6G2AYU","https://www.buymeacoffee.com/kartikv"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\r\n    \u003ca href=\"http://demos.krajee.com\" title=\"Krajee Demos\" target=\"_blank\"\u003e\r\n        \u003cimg src=\"http://kartik-v.github.io/bootstrap-fileinput-samples/samples/krajee-logo-b.png\" alt=\"Krajee Logo\"/\u003e\r\n    \u003c/a\u003e\r\n    \u003cbr\u003e\r\n    yii2-widget-activeform\r\n    \u003chr\u003e\r\n    \u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=DTP3NZQ6G2AYU\"\r\n       title=\"Donate via Paypal\" target=\"_blank\"\u003e\u003cimg height=\"60\" src=\"https://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png\" alt=\"Donate\"/\u003e\u003c/a\u003e\r\n    \u0026nbsp; \u0026nbsp; \u0026nbsp;\r\n    \u003ca href=\"https://www.buymeacoffee.com/kartikv\" title=\"Buy me a coffee\" \u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"60\" alt=\"kartikv\" /\u003e\u003c/a\u003e\r\n\u003c/h1\u003e\r\n\r\n[![Stable Version](https://poser.pugx.org/kartik-v/yii2-widget-activeform/v/stable)](https://packagist.org/packages/kartik-v/yii2-widget-activeform)\r\n[![Unstable Version](https://poser.pugx.org/kartik-v/yii2-widget-activeform/v/unstable)](https://packagist.org/packages/kartik-v/yii2-widget-activeform)\r\n[![License](https://poser.pugx.org/kartik-v/yii2-widget-activeform/license)](https://packagist.org/packages/kartik-v/yii2-widget-activeform)\r\n[![Total Downloads](https://poser.pugx.org/kartik-v/yii2-widget-activeform/downloads)](https://packagist.org/packages/kartik-v/yii2-widget-activeform)\r\n[![Monthly Downloads](https://poser.pugx.org/kartik-v/yii2-widget-activeform/d/monthly)](https://packagist.org/packages/kartik-v/yii2-widget-activeform)\r\n[![Daily Downloads](https://poser.pugx.org/kartik-v/yii2-widget-activeform/d/daily)](https://packagist.org/packages/kartik-v/yii2-widget-activeform)\r\n\r\nExtends and enhances the [Yii ActiveForm widget](https://github.com/yiisoft/yii2/blob/master/framework/widgets/ActiveForm.php). Facilitates all [three form layouts](http://getbootstrap.com/css/#forms-example) available in Bootstrap i.e. __vertical__, __horizontal__, and __inline__. Allows options for offsetting labels and inputs for horizontal form layout. Works closely with the extended ActiveField component. In addition, this extension enhances and extends the [Yii ActiveField component](https://github.com/yiisoft/yii2/blob/master/framework/widgets/ActiveField.php). Allows Bootstrap styled [input group addons](http://getbootstrap.com/components/#input-groups-basic) to be prepended or appended to textInputs. Implements [feedback icons](http://getbootstrap.com/css/#with-optional-icons) within inputs based on contextual states. Automatically adjusts checkboxes and radio input offsets for horizontal forms. Allows, flexibility to control the labels and placeholders based on form layout style (e.g. hide labels and show them as placeholder for inline forms). The extended ActiveField functionalities available are:\r\n\r\n- Addons\r\n    * Prepend Addon\r\n    * Append Addon\r\n    * Icon Addon\r\n    * Input Addon\r\n    * Button Addon\r\n    * Button Dropdown Addon\r\n    * Segmented Button Addon\r\n    * Prepend \u0026 Append\r\n    * Input Group Settings\r\n    * Multiple Addons Configuration (_new_ since v1.4.9)\r\n- Input Feedback Icons\r\n- Input Hints Management\r\n- Inputs\r\n    * Checkbox\r\n    * Radio\r\n    * Checkbox List\r\n    * Radio List\r\n    * Static Input\r\n    * HTML 5 Input\r\n    * Checkbox Button Group\r\n    * Radio Button Group  \r\n- Multi Select\r\n    * Vertical Form\r\n    * Horizontal Form\r\n    * Radio List\r\n    * Display Options\r\n    \r\n\u003e NOTE: This extension is a sub repo split of [yii2-widgets](https://github.com/kartik-v/yii2-widgets). The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of [yii2-widgets](http://demos.krajee.com/widgets).\r\n\r\n## Installation\r\n\r\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/kartik-v/yii2-widget-activeform/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.\r\n\r\nTo install, either run\r\n\r\n```\r\n$ php composer.phar require kartik-v/yii2-widget-activeform \"@dev\"\r\n```\r\n\r\nor add\r\n\r\n```\r\n\"kartik-v/yii2-widget-activeform\": \"@dev\"\r\n```\r\n\r\nto the ```require``` section of your `composer.json` file.\r\n\r\n## Release Changes\r\n\r\n\u003e NOTE: Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-activeform/blob/master/CHANGE.md) for details on changes to various releases.\r\n\r\n## Demo\r\n\r\nYou can refer detailed documentation and demos for understanding the usage of the extension at these links below:\r\n\r\n- [ActiveForm](http://demos.krajee.com/widget-details/active-form) \r\n- [ActiveField](http://demos.krajee.com/widget-details/active-field) \r\n- [Html5Input](http://demos.krajee.com/html5-demo) \r\n\r\n## Usage\r\n\r\n### ActiveForm\r\n\r\n```php\r\n// add this in your view\r\nuse kartik\\form\\ActiveForm;\r\n\r\n// Vertical Form\r\n$form = ActiveForm::begin([\r\n    'id' =\u003e 'form-signup',\r\n    'type' =\u003e ActiveForm::TYPE_VERTICAL\r\n]);\r\n\r\n// Inline Form\r\n$form = ActiveForm::begin([\r\n    'id' =\u003e 'form-login', \r\n    'type' =\u003e ActiveForm::TYPE_INLINE,\r\n    'fieldConfig' =\u003e ['autoPlaceholder'=\u003etrue]\r\n]);\r\n\r\n// Horizontal Form Configuration\r\n$form = ActiveForm::begin([\r\n    'id' =\u003e 'form-signup', \r\n    'type' =\u003e ActiveForm::TYPE_HORIZONTAL,\r\n    'formConfig' =\u003e ['labelSpan' =\u003e 3, 'deviceSize' =\u003e ActiveForm::SIZE_SMALL]\r\n]);\r\n```\r\n\r\n### ActiveField\r\n```php\r\n// Implement a feedback icon\r\necho $form-\u003efield($model, 'email_2', [\r\n    'feedbackIcon' =\u003e [\r\n        'default' =\u003e 'envelope',\r\n        'success' =\u003e 'ok',\r\n        'error' =\u003e 'exclamation-sign',\r\n        'defaultOptions' =\u003e ['class'=\u003e'text-primary']\r\n    ]\r\n])-\u003etextInput(['placeholder'=\u003e'Enter a valid email address...']);\r\n\r\n// Prepend an addon text\r\necho $form-\u003efield($model, 'email', ['addon' =\u003e ['prepend' =\u003e ['content'=\u003e'@']]]);\r\n\r\n// Append an addon text\r\necho $form-\u003efield($model, 'amount_paid', [\r\n    'addon' =\u003e ['append' =\u003e ['content'=\u003e'.00']]\r\n]);\r\n\r\n// Formatted addons (like icons)\r\necho $form-\u003efield($model, 'phone', [\r\n    'addon' =\u003e [\r\n        'prepend' =\u003e [\r\n            'content' =\u003e '\u003ci class=\"fas fa-phone\"\u003e\u003c/i\u003e'\r\n        ]\r\n    ]\r\n]);\r\n\r\n// Formatted addons (inputs)\r\necho $form-\u003efield($model, 'phone', [\r\n    'addon' =\u003e [\r\n        'prepend' =\u003e [\r\n            'content' =\u003e '\u003cinput type=\"radio\"\u003e'\r\n        ]\r\n    ]\r\n]);\r\n\r\n// Formatted addons (buttons)\r\necho $form-\u003efield($model, 'phone', [\r\n    'addon' =\u003e [\r\n        'prepend' =\u003e [\r\n            'content' =\u003e Html::button('Go', ['class'=\u003e'btn btn-primary']),\r\n            'asButton' =\u003e true\r\n        ]\r\n    ]\r\n]);\r\n```\r\n\r\n## License\r\n\r\n**yii2-widget-activeform** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartik-v%2Fyii2-widget-activeform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkartik-v%2Fyii2-widget-activeform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartik-v%2Fyii2-widget-activeform/lists"}