1,813
การแก้ไข
| บรรทัดที่ 273: | บรรทัดที่ 273: | ||
* '''{{code|form_dom}}''' refers to the {{code|lang=html|<form>}} DOM element | * '''{{code|form_dom}}''' refers to the {{code|lang=html|<form>}} DOM element | ||
* '''{{code|form_obj}}''' refers to the JavaScript form object. | * '''{{code|form_obj}}''' refers to the JavaScript form object. | ||
=== General Form Head & Form Object === | === General Form Head & Form Object === | ||
| บรรทัดที่ 345: | บรรทัดที่ 343: | ||
=== CuneiForm Jinja2 Macro Pack === | === CuneiForm Jinja2 Macro Pack === | ||
When putting form fields onto the client-side pages, there is absolutely nothing stopping developers from using the ordinary WTForms+Jinja2 approach. However, with the amount of forms and fields CuneiFox will be handling, the code can get unwieldy fast. So, at the cost of some flexibility, CuneiFox comes with a macro series to automate the most common field formats, along with the accompanying scripts and events. Let us take a little tour on these macros. | When putting form fields onto the client-side pages, there is absolutely nothing stopping developers from using the ordinary WTForms+Jinja2 approach. However, with the amount of forms and fields CuneiFox will be handling, the code can get unwieldy fast. So, at the cost of some flexibility, CuneiFox comes with a macro series to automate the most common field formats, along with the accompanying scripts and events. Let us take a little tour on these macros. | ||
Due to the number of arguments in these macros, for the sake of all things holy, '''DO NOT''' rely on argument order farther than ''form'' and ''blank'', '''ALWAYS PROVIDE''' argument keywords. | |||
==== String & Text Area Fields ==== | ==== String & Text Area Fields ==== | ||