ZEXPÈÈ((U OFS.FolderqUFolderqtqNt.}q(UStickyq(U$2q(hUFolderqttQUidqUFormulatorExamplesq U__ac_local_roles__q }q Ufaassenq ]q UOwnerqasU_objectsq(}q(U meta_typeqUFolderqhUSimplequ}q(U meta_typeqUFolderqUidqU Automaticqu}q(hhhU ManualLayoutqu}q(U meta_typeqUFolderqUidqhuth(UÉq(hUFolderq ttQUtitleq!Uh(U$ q"(hUFolderq#ttQh(U$q$(hUFolderq%ttQU_ownerq&(]q'U acl_usersq(ah tq)u.$2£((U OFS.FolderqUFolderqtqNt.}q(U index_htmlq(U$7q(UOFS.DTMLMethodqU DTMLMethodqttQUidq UStickyq U__ac_local_roles__q }q Ufaassenq ]qUOwnerqasU_objectsq(}q(U meta_typeqUFormulator Formqh Uformqu}q(hU DTML Methodqh U index_htmlqu}q(hhh UinfoqutUtitleqU A Sticky FormqUformq(U$4q(UProducts.Formulator.FormqU PythonFormqttQUinfoq (U$8q!(hU DTMLMethodq"ttQu.Éù((U OFS.FolderqUFolderqtqNt.}q(U index_htmlq(UÐq(UOFS.DTMLMethodqU DTMLMethodqttQUidq USimpleq U__ac_local_roles__q }q Ufaassenq ]qUOwnerqasU_objectsq(}q(U meta_typeqUFormulator Formqh Uformqu}q(hU DTML Methodqh U index_htmlqu}q(hhh Ufeedbackqu}q(U meta_typeqU DTML MethodqUidqUinfoqutUtitleqU A Simple Formq Uformq!(UÊq"(UProducts.Formulator.Formq#U PythonFormq$ttQh(UÑq%(hU DTMLMethodq&ttQUinfoq'(U$q((hU DTMLMethodq)ttQu.$ %((U OFS.FolderqUFolderqtqNt.}q(U index_htmlq(U$q(UOFS.DTMLMethodqU DTMLMethodqttQUidq U Automaticq U__ac_local_roles__q }q Ufaassenq ]qUOwnerqasU form_validateq(U$q(hU DTMLMethodqttQU_objectsq(}q(U meta_typeqU DTML Methodqh U form_bodyqu}q(hUFolderqh Uau}q(hhh Ubu}q(hhh hu}q(hhh Uinfoqu}q(hhh U index_htmlquth(U$ q (hU DTMLMethodq!ttQUtitleq"UAutomatic Form Layoutq#Uinfoq$(U$q%(hU DTMLMethodq&ttQUb(U$q'(hUFolderq(ttQUa(U$ q)(hUFolderq*ttQu.$´((U OFS.FolderqUFolderqtqNt.}q(U index_htmlq(U$#q(UOFS.DTMLMethodqU DTMLMethodqttQUidq U ManualLayoutq U__ac_local_roles__q }q Ufaassenq ]qUOwnerqasU_objectsq(}q(U meta_typeqU DTML Methodqh Uinfoqu}q(hUFormulator Formqh Uformqu}q(hhh U index_htmlqutUtitleqUForms with manual layoutqUformq(U$q(UProducts.Formulator.FormqU PythonFormqttQUinfoq (U$q!(hU DTMLMethodq"ttQu.$7Ž((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqTá

Please fill in this form.

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU index_htmlqU_varsq}qu.$4h((UProducts.Formulator.FormqU PythonFormqtqNt.}q(U group_listq]qUDefaultqaUidqUformq Uageq (U$6q (U"Products.Formulator.StandardFieldsq U IntegerFieldq ttQU_objectsq(}q(U meta_typeqU IntegerFieldqhUagequ}q(hU StringFieldqhUnamequtUtitleqUUgroupsq}qh]q(hhesUnameq(U$5q(h U StringFieldqttQU row_lengthqKu.$8e((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqUÁ

This form is 'sticky'; submits go to the same page, and the previous values you filled in will appear on the page. No attempt to catch validation errors is made in this example.

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qUinfoqU_varsq}qu.Ðb((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqTµ

Please fill in this form.

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU index_htmlqU_varsq}qu.Êh((UProducts.Formulator.FormqU PythonFormqtqNt.}q(U group_listq]qUDefaultqaUidqUformq Unameq (UÏq (U"Products.Formulator.StandardFieldsq U StringFieldq ttQUageq(UÎq(h U IntegerFieldqttQU_objectsq(}q(U meta_typeqU IntegerFieldqhUagequ}q(hU StringFieldqhUnamequtUtitleqUUgroupsq}qh]q(hhesU row_lengthqKu.Ñ®((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqT

You made some mistake when you filled in the form.

  • :

Ah, , so you are years old?

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qUfeedbackqU_varsq}qu.$ž((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqUú

A very simple demonstration of using formulator.

form is a formulator form that contains fields.

index_html displays the form.

feedback calls the form's validation code and gives feedback in case of success or failure.

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qUinfoqU_varsq}qu.$ù((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqUO qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU index_htmlqU_varsq}qu.$u((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqTÅ

Sorry, there were errors.

  • :
qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU form_validateqU_varsq}qu.$ Â((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqT

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU form_bodyqU_varsq}qu.$Ö((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqT/

Much like the Simple example, but this shows how you can use acquisition to automate the form layout and validation feedback for multiple subfolders, a and b. You can create your own folder using the same facilities to experiment.

Folder a

Folder b

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qUinfoqU_varsq}qu.$—((U OFS.FolderqUFolderqtqNt.}q(U index_htmlq(U$q(UOFS.DTMLMethodqU DTMLMethodqttQUidq UbU__ac_local_roles__q }q Ufaassenq ]q UOwnerqasU submit_okq(U$q(hU DTMLMethodqttQU_objectsq(}q(U meta_typeqU DTML Methodqh U index_htmlqu}q(hUFormulator Formqh Uformqu}q(hhh U submit_okqutUtitleqUUformq(U$q(UProducts.Formulator.FormqU PythonFormq ttQu.$ Œ((U OFS.FolderqUFolderqtqNt.}q(U index_htmlq(U$q(UOFS.DTMLMethodqU DTMLMethodqttQUidq UaU__ac_local_roles__q }q Ufaassenq ]q UOwnerqasU submit_okq(U$q(hU DTMLMethodqttQU_objectsq(}q(U meta_typeqUFormulator Formqh Uformqu}q(hU DTML Methodqh U index_htmlqu}q(hhh hutUtitleqUUformq(U$q(UProducts.Formulator.FormqU PythonFormqttQu.$##((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqTv
qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU index_htmlqU_varsq}qu.$((UProducts.Formulator.FormqU PythonFormqtqNt.}q(Ucheckq(U$q(U"Products.Formulator.StandardFieldsqU CheckBoxFieldqttQU group_listq ]q UDefaultq aUidq Uformq Ustring2q(U$!q(hU StringFieldqttQU_objectsq(}q(U meta_typeqU CheckBoxFieldqh Ucheckqu}q(hU StringFieldqh Ustringqu}q(hhh hu}q(hU TextAreaFieldqh UtextareaqutUstringq(U$ q(hU StringFieldqttQUtitleq UUgroupsq!}q"h ]q#(hhhhesU row_lengthq$KUtextareaq%(U$"q&(hU TextAreaFieldq'ttQu.$G((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqU£

No validation at all this time; just showing how you can manually layout your forms as well. You don't have to use get_groups() and get_fields_from_group().

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qUinfoqU_varsq}qu.$6Q((U"Products.Formulator.StandardFieldsqU IntegerFieldqtqNt.}q(Uvaluesq}q(UtitleqU Enter AgeqU descriptionq UUrequiredq KU display_widthq KUdisplay_maxwidthq KUdefaultq UuUidqUageqUmessage_valuesq}q(U not_integerqUYou did not enter an integer.qUrequired_not_foundqU%Input is required but no input given.quu.$5h((U"Products.Formulator.StandardFieldsqU StringFieldqtqNt.}q(Uvaluesq}q(Udisplay_maxwidthqKUrequiredqKU display_widthq KUdefaultq UUtitleq U Your nameq Utruncateq KU descriptionqUU max_lengthqKuUidqUnameqUmessage_valuesq}q(Utoo_longqUToo much input was given.qUrequired_not_foundqU%Input is required but no input given.quu.Ïh((U"Products.Formulator.StandardFieldsqU StringFieldqtqNt.}q(Umessage_valuesq}q(Utoo_longqUToo much input was given.qUrequired_not_foundq U%Input is required but no input given.q uUidq Unameq Uvaluesq }q(Udisplay_maxwidthqKUrequiredqKU display_widthqKUdefaultqUUtitleqU Your nameqUtruncateqKU descriptionqUU max_lengthqKuu.ÎQ((U"Products.Formulator.StandardFieldsqU IntegerFieldqtqNt.}q(Umessage_valuesq}q(U not_integerqUYou did not enter an integer.qUrequired_not_foundq U%Input is required but no input given.q uUidq Uageq Uvaluesq }q(UtitleqU Enter AgeqU descriptionqUUrequiredqKU display_widthqKUdisplay_maxwidthqKUdefaultqUuu.$þ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqUT qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU index_htmlqU_varsq}qu.$Á((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqT

The passwords were not the same!

The passwords were the same.

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU submit_okqU_varsq}qu.$_((UProducts.Formulator.FormqU PythonFormqtqNt.}q(U group_listq]qUDefaultqaUidqUformq U_objectsq (}q (U meta_typeq U PasswordFieldq hU password1qu}q(h h hU password2qutUtitleqUUgroupsq}qh]q(hhesU row_lengthqKh(U$q(U"Products.Formulator.StandardFieldsqU PasswordFieldqttQh(U$q(hU PasswordFieldqttQu.$þ((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqUT qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU index_htmlqU_varsq}qu.$e((UOFS.DTMLMethodqU DTMLMethodqtqNt.}q(UtitleqUUrawqU¼

Everything was okay; you picked

qU__ac_local_roles__q}q Ufaassenq ]q UOwnerq asUglobalsq }qU__name__qU submit_okqU_varsq}qu.$((UProducts.Formulator.FormqU PythonFormqtqNt.}q(Uchoiceq(U$q(U"Products.Formulator.StandardFieldsqU ListFieldqttQU group_listq ]q UDefaultq aUidq Uformq U_objectsq(}q(U meta_typeqU ListFieldqh UchoicequtUtitleqUUgroupsq}qh ]qhasU row_lengthqKu.$º((U"Products.Formulator.StandardFieldsqU CheckBoxFieldqtqNt.}q(Umessage_valuesq}qUidqUcheckqUvaluesq }q (Utitleq UCheckboxq U descriptionq UU css_classqUUdefaultqKuu.$!((U"Products.Formulator.StandardFieldsqU StringFieldqtqNt.}q(Umessage_valuesq}q(Utoo_longqUToo much input was given.qUrequired_not_foundq U%Input is required but no input given.q uUidq Ustring2q Uvaluesq }q(Udisplay_maxwidthqKUrequiredqKU display_widthqKU css_classqUUdefaultqUUtitleqUAnother StringqUtruncateqKU descriptionqUU max_lengthqKuu.$ v((U"Products.Formulator.StandardFieldsqU StringFieldqtqNt.}q(Umessage_valuesq}q(Utoo_longqUToo much input was given.qUrequired_not_foundq U%Input is required but no input given.q uUidq Ustringq Uvaluesq }q(Udisplay_maxwidthqKUrequiredqKU display_widthqKU css_classqUUdefaultqUUtitleqUStringqUtruncateqKU descriptionqUU max_lengthqKuu.$"ã((U"Products.Formulator.StandardFieldsqU TextAreaFieldqtqNt.}q(UidqUtextareaqUmessage_valuesq}q(U line_too_longq UA line was too long.q Urequired_not_foundq U%Input is required but no input given.q Utoo_longq U You entered too many characters.qUtoo_many_linesqUYou entered too many lines.quUvaluesq}q(Umax_linelengthqKU max_lengthqKU max_linesqKUwidthqK UheightqKUrequiredqKU css_classqUUdefaultqUUtitleqU A Text AreaqU descriptionqUuu.$…((U"Products.Formulator.StandardFieldsqU PasswordFieldqtqNt.}q(Umessage_valuesq}q(Utoo_longqUToo much input was given.qUrequired_not_foundq U%Input is required but no input given.q uUidq U password2q Uvaluesq }q(Udisplay_maxwidthqKUrequiredqKU display_widthqKU css_classqUUdefaultqUUtitleqUPassword (again)qUtruncateqKU descriptionqUU max_lengthqKuu.$}((U"Products.Formulator.StandardFieldsqU PasswordFieldqtqNt.}q(Umessage_valuesq}q(Utoo_longqUToo much input was given.qUrequired_not_foundq U%Input is required but no input given.q uUidq U password1q Uvaluesq }q(Udisplay_maxwidthqKUrequiredqKU display_widthqKU css_classqUUdefaultqUUtitleqUPasswordqUtruncateqKU descriptionqUU max_lengthqKuu.$­((U"Products.Formulator.StandardFieldsqU ListFieldqtqNt.}q(UidqUchoiceqUmessage_valuesq}q(Urequired_not_foundq U%Input is required but no input given.q Uunknown_selectionq U.You selected an item that was not in the list.q uUvaluesq }q(UsizeqKU css_classqUUrequiredqKUitemsq]q((Ufooqht(Ubarqht(UbazqhteUdefaultqUUtitleqU Make a choiceqU first_itemqKU descriptionqUU items_methodqUuu.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ