WEBAPPS
Front-end Submit WebApps
6min
when you make a new webapp , a front end form file is automatically generated within your webapp, in a folder called form it automatically contains all fields from your webapp you can view this folder using code editor, it is next to the detail and list folders for your webapp syntax output your webapp form on a page {% include 'webapp form', id 'custom webapp 1' %} toolbox has support for webapp input forms, and the following options will be given in the modal, or you can set them yourself enabled default is false boolean determines if items are auto enabled or not expiry date default is never expires timestamp when the new item will expire release date default is as soon as the form is submitted timestamp when the new item will be released upload dir string default is documents/form uploads/webapp 1/ where uploaded files will be stored must follow this format 'folder/optional folder/' standard fields some fields are required for the form to be able to set up the webapp items correctly these fields are for 'enabled', 'expiry date', 'release date', 'upload dir', and 'slug' they stay the same each form, and don't have a webapp specific id attached to them all forms should be wrapped in a liquid form tag {% form %}{% endform %} all forms need a submission button \<button onclick="s form submit v2(this,'webapp 1')">submit\</button> category field (optional) example 1 this example can be used for a webapp submit form that is displayed within a the layout of another webapp or module this category array\[0] finds the first category the current item is categorised to and can be changed to be a full array, or specific category id example 2 this example can be used on pages other than webapp and module layouts 123456 replace with the id of a category of your choice location field (optional) you can submit a location value for a webapp item as shown in the following example the value should be a stringified json object