DESCRIPTION

The Form plugins generate forms from JSON schemas. Plugin and application developers can use the form plugin API to make forms, and then sites can load a specific form library plugin to match the style of the site.

NOTE: This API is EXPERIMENTAL and will be considered stable in Yancy version 2.0. Please report any issues you have or features you'd like to see. Minor things may change before version 2.0, so be sure to read the release changelog before upgrading.

Available Libraries

HELPERS

All form plugins add the same helpers with the same arguments so that applications can use the form plugin that matches their site's appearance. Yancy plugin and app developers should use form plugins to build forms so that users can easily customize the form's appearance.

For string types, the format the string should take. One of the supported JSON schema formats, along with some additional ones. See "Generated Forms" in Yancy::Help::Config for details on the supported formats.

pattern

A regex pattern to validate the field before submit.

required

If true, the field will be marked as required.

readonly

If true, the field will be marked as read-only.

disabled

If true, the field will be marked as disabled.

placeholder

The placeholder for <input> and <textarea> elements.

id

The ID for this field.

class

A string with additional classes to add to this field.

minlength

The minimum length of the text in this field. Used to validate the form.

maxlength

The maximum length of the text in this field. Used to validate the form.

minimum

The minimum value for the number in this field. Used to validate the form.

maximum

The maximum value for the number in this field. Used to validate the form.

As a valued partner and proud supporter of MetaCPAN, StickerYou is
happy to offer a 10% discount on all Custom Stickers,
Business Labels, Roll Labels,
Vinyl Lettering or Custom Decals. StickerYou.com
is your one-stop shop to make your business stick.
Use code METACPAN10 at checkout to apply your discount.