WEBAPPS
Front-end Submit WebApps
WebApps - Front End Edit
10min
introduction if a logged in visitor to your site has submitted a webapp item, they can now edit it too the webapp creator most webapps, including those created by the admin and those created by visitors who are not logged in will not store the id of a creator however, any webapps created front end by a logged in user will store their creator's id in the creator field filtering a webapp list by creator finding webapp items created by the current user {% include 'webapp' id '1' layout 'default' type 'list' creator id context current user id %} finding webapp items created by any specific user in this example we create a variable by hard coding a specific user id {% assign user id = '8' %} {% include 'webapp' id '1' layout 'default' type 'list' creator id user id %} outputting information about the creator in the webapp layout you can now access the following fields inside a webapp layout {{this creator id}} {{this creator name}} {{this creator first name}} {{this creator last name}} {{this creator created at}} only owners of a webapp item that are logged in can view an edit form for that item find other webapp items with the same creator you could of course combine both of these features creating a link to the same page including the creator id as a query parameter and then filtering by that id using context params to fetch the id from the url syntax for the edit form including the form inside a webapp layout unlike the "add" form, the front end webapp edit form must be linked to the specific webapp item it will edit this means you can only output the form inside a webapp detail or list layout file to include the edit form inside a webapp layout, add the liquid tag {% include 'webapp form edit', layout 'default' %} parameters layout optional choose the name of your layout file important even if you include the liquid tag, the form will only display for visitors who are logged in and are registered as that webapp's creator developing the form layout the edit form will work if you use the same layout as you used for your add form however, you may wish to use an alternative layout so you can add some additional features dynamic fields from the webapp as you're including the edit form inside a webapp item, you have access to the webapp fields that are inherited from the webapp layout one example might be adding a title to the form which dynamically references the webapp item \<h3>edit {\[this name}}\</h3> another example might be displaying the creator's name \<h4>by {\[this creator name}}\</h4> pre filling values in a form layout, we use the form builder variable to dynamically add the correct name attribute to inputs you can use this to output the pre filled value; instead of the name property, output the value property for this example webapp field \<input name="{{form builder fields properties webapp field 1 1 name}}"> you can use the name field and replace name with value to add a value attribute