Download the PHP package pinkcrab/form_fields without Composer
On this page you can find all versions of the php package pinkcrab/form_fields. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package form_fields
PinkCrab Form Fields
A simple way of parsing html5 form elements. Not a comprensive package, just enough to render most fields in wp-admin.
Installation
To install from composer please run
Basic Usage
To create a simple form field and render(print) it to the screen
You can return the HTML string of the input using as_string()
Field Types
- Text
- Search
- Password
- URL
- Tel
- Number
- Range
- Text Area
- Date
- Date Time
- Checkbox (Single & Group)
- Radio
- Select
- Raw HTML
- Hidden
- Week
- Month
- Image (button)
- Submit
All inputs are extended from the Abstract_Field class and have all the functionality laid out in the Base Field section.
Labels
Output
Each form field is preloaded with a parser which can either render the input field or return the HTML. If you create your own field, you can make use of our existing parsers or create your own, using the Parser interface.
Field Creation
All of our Form Fields has protected __construct
'ors and need to be created using the create() named constructor.
Version
Release 0.1.7
Change Log
- 0.1.8 - Label is now auto shown if length is above 0 and hidden if 0.
- 0.1.7 - Added in missing URL field, also all tests cleaned up and all attributes are now just controlled by attributes, not custom properties. Added in the Datalist attribute to all valid input fields. Tests extended running over 1500 assertions
- 0.1.6 - Added in missing fields [ Colour(inc alias Color), Week, Time, Month, File, Image, Submit & Tel ] and moved to a new abstract INPUT which is used to extend all \<INPUT> fields from a base abstract input. Tests cleaned up and all attributes are now just controlled by attributes, not custom properties.
- 0.1.5 - Allow numerical strings for select options.
- 0.1.4 - Removed default as not implemented and not really suitable for this library. Also included the option to set custom name attributes to fields, falling back to the key (id) if not set.
- 0.1.3 - Added in the Checkbox Group field
- 0.1.2 - Various bug fixes
- 0.1.1 - Various bug fixes