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

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

เพิ่มขึ้น 967 ไบต์ ,  11 เมษายน 2567
บรรทัดที่ 458: บรรทัดที่ 458:
==== File & Image Fields ====
==== File & Image Fields ====


<div><ul>
<li style="display: inline-block;">[[ไฟล์:Form FileField fat.png|300px|thumb|none|alt=File fields created via 'render_upload'.|File fields created via 'render_upload'.]]</li>
<li style="display: inline-block;">[[ไฟล์:Form FileField slim.png|300px|thumb|none|alt=File fields (slim) created via 'render_upload'.|File fields (slim) created via 'render_upload'.]]</li>
</ul></div>


'''NOTE THAT''' the image box is not drawn as a part of the Jinja2 macro. Developers must create the {{code|lang=html|<img>}} manually and assign to it the id {{code|lang=javascript|'<field_id>-imgbox'}} ''before running {{code|general_form_tail}}''. The tail macro shall automatically link the image box with the form field.
'''<syntaxhighlight lang="javascript">
render_upload(form, blank,
              field_modal=false, field_tab=false,
              label_width="105px", headless=false,
              hidden=false, tabindex=false,
              pad_bottom="default",
              force_fat=false, force_slim=false, slim_pb=2)
</syntaxhighlight>'''
 
{| style="margin-left:20px;"
|- style="vertical-align:top;"
| style="width:120px;" | '''Parameters''' || ''(See descriptions under [[#String & Text Area Fields]] sub-section)''
|}
 
'''NOTES''' on additional buttons and image box:
* The image box is not drawn as a part of the Jinja2 macro. Developers must create the {{code|lang=html|<img>}} manually and assign to it the id {{code|lang=javascript|'<field_id>-imgbox'}} ''before running {{code|general_form_tail}}''. The tail macro shall automatically link the image box with the form field.
* isshot
* isdel


==== Buttons & Submits ====
==== Buttons & Submits ====