ข้ามไปเนื้อหา

ผลต่างระหว่างรุ่นของ "CuneiForm"

บรรทัดที่ 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.
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.


=== General Form Head & Form Object ===
=== General Form Head & Form Object ===
บรรทัดที่ 352: บรรทัดที่ 354:


String and text-area fields are the most prevalent type of form fields, and also one most riddled with features and expectations. The CuneiFox macro that handles rendering of these fields is {{code|render_blank}}.
String and text-area fields are the most prevalent type of form fields, and also one most riddled with features and expectations. The CuneiFox macro that handles rendering of these fields is {{code|render_blank}}.
Due to the sheer number of arguments here, for the sake of all things holy, '''DO NOT''' rely on argument order farther than ''form'' and ''blank'', '''ALWAYS PROVIDE''' argument keywords.


'''<syntaxhighlight lang="javascript">
'''<syntaxhighlight lang="javascript">
บรรทัดที่ 401: บรรทัดที่ 401:
<li style="display: inline-block;">[[ไฟล์:Form SelectField slim.png|300px|thumb|none|alt=Drop-list fields (slim) created via 'render_select'.|Drop-list fields (slim) created via 'render_select'.]]</li>
<li style="display: inline-block;">[[ไฟล์:Form SelectField slim.png|300px|thumb|none|alt=Drop-list fields (slim) created via 'render_select'.|Drop-list fields (slim) created via 'render_select'.]]</li>
</ul></div>
</ul></div>
The CuneiFox macro that handles rendering of drop-list fields is {{code|render_select}}. Again, '''DO NOT''' rely on argument order farther than ''form'' and ''blank'', '''ALWAYS PROVIDE''' argument keywords.


'''<syntaxhighlight lang="javascript">
'''<syntaxhighlight lang="javascript">
บรรทัดที่ 424: บรรทัดที่ 422:


[[ไฟล์:Form_BoolField.png|300px|thumb|center|alt=Checkboxes and toggles created via 'render_check' and 'render_toggle'.|Checkboxes and toggles created via 'render_check' and 'render_toggle'.]]
[[ไฟล์:Form_BoolField.png|300px|thumb|center|alt=Checkboxes and toggles created via 'render_check' and 'render_toggle'.|Checkboxes and toggles created via 'render_check' and 'render_toggle'.]]
'''DO NOT''' rely on argument order farther than ''form'' and ''blank'', '''ALWAYS PROVIDE''' argument keywords.


'''<syntaxhighlight lang="javascript">
'''<syntaxhighlight lang="javascript">
บรรทัดที่ 449: บรรทัดที่ 445:


[[ไฟล์:Form_RadioField.png|400px|thumb|center|alt=Radio fields created via 'render_radio' (with 2 columns).|Radio fields created via 'render_radio' (with 2 columns).]]
[[ไฟล์:Form_RadioField.png|400px|thumb|center|alt=Radio fields created via 'render_radio' (with 2 columns).|Radio fields created via 'render_radio' (with 2 columns).]]
'''DO NOT''' rely on argument order farther than ''form'' and ''blank'', '''ALWAYS PROVIDE''' argument keywords.


'''<syntaxhighlight lang="javascript">
'''<syntaxhighlight lang="javascript">