Forms

Form objects are what the Action and Condition use.

Action objects have execute(form) against Form objects, and Condition objects have validate(form) to validate against a Form.

See respective documentations for more information about what this does client and server side.

JavaScript

Form

class Form(element, rules, prefix)

Form

Field

class Field(form, name)

Field

Python

Form

class facond.forms.Form(*args, **kwargs)[source]

Hook into full_clean to apply rules before full_clean.

class Media[source]

Load our built JS.

full_clean()[source]

Apply each rule during validation, and then unapply them.

js_dict()[source]

Craft a simple JS dict for this complex Python object.

ScriptField

class facond.forms.ScriptField(data)[source]

Field to render the JSON configuration and figure the form prefix.

ScriptWidget

class facond.forms.ScriptWidget(data)[source]

JSON rendering.

is_hidden()[source]

Don’t render no field container nor label.

render(name, value, attrs=None)[source]

Render a script tag with JSON configuration.