• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Loading a New input form or existing Web App item edit form based upon association (or lack there of) of a different web app's item view

New Here ,
Oct 07, 2015 Oct 07, 2015

Copy link to clipboard

Copied

I have two web apps.  The web app items for each web app are built serially. The user will create a web app item from the first web app.  Once the web app is enabled by the admin the user can return to that web app and view it.  The view of the web app will include  the second web apps’s input form.  The second will be used to create a new web app item that will be linked/associated to the first via its ID (or itemname).

I need the user to be able to return to the original web app item (or the one created by the second) and be able to edit the second web app item.  The second app item will need multiple edits until finished. 

In other words, when a user returns to an existing item from the first web app I need the following to occur using liquid:

:

Get a collection of  the current web app item

Get a collection of all second web app items

Loop through all second web app items

If the web app item’s ID ==  current first/current web app item

     Display matching second web app item’s edit form

If no matches

     Show second web app input form

     Assign current first web app item id to web app input form

My problem

I do not know how to display the input form for the second web app without putting it in an iframe.  I would like the page to be assembled on the server with the correct input form.

I hope I have been clear (please ask any questions to help in this regard) and appreciate any help.

TOPICS
Developer

Views

317

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 07, 2015 Oct 07, 2015

Copy link to clipboard

Copied

My problem I do not know how to display the input form for the second web app without putting it in an iframe.  I would like the page to be assembled on the server with the correct input form.

Have you tried using js, like hiding and showing the relevant form based on liquid logic. I don't think you need iframe. If am not mistaken.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 07, 2015 Oct 07, 2015

Copy link to clipboard

Copied

topelovely,
Thank you for posting.
Hiding the initial form with js works fine, but once that form is filled out and has created a web app item I need a way to load the newly created web app item's edit form within that page.  Like an include and or a content holder...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 07, 2015 Oct 07, 2015

Copy link to clipboard

Copied

Have u tried adding a custom parameter to the  form so that after submission you display the new form in another page or a hidden div which is revealed after form submission?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 07, 2015 Oct 07, 2015

Copy link to clipboard

Copied

LATEST

Hi,

You don't need iframes, and/or need to use JS extensively. You can get away with doing most if not all of this with just one web app.

You could use JS if you want to silently update the 1st web app form with another identifier keeping a copy of the 2nd web apps in for association reason, if you get what I mean - but this is an extra step, a kind of extra for experts as I say.

Step 1) since you're viewing a list of all 1st web app items created by the user, you can also place an "edit" button next to each list item's listing, enabling you to complete the 1st web apps submission, in case you need to.

Step 2) you need to determine if and when the 1st web app data is completed. If the form still needs editing, refer to step 1. If 1st web app editing is complete, merely clicking on the item will take you do the detail view of web app1, giving you itemid's and web app data as raw liquid data, no collection required, as you're already in the detail view of the webapp.

Step 3) now display the input form for the 2nd web app, pre-filling out certain fields with web app 1 data, like itemid etc. Just know that even though you're only half filling out items for web app 2, you need all items in the form, hidden or visible to be submitted in a new submit or an edit. If you only edit, say 4 fields out of 10 fields, the other 6 fields will become blank. This is a BC gotcha!

Please note that although I specified using the detail view of the 1st web app, this could easily be an edit, or a template page of your choice, and/or just a whole page on it's own where you're merely collecting data.

Here's an example where I'm collecting web app data, be it input or view by passing a web app id into the page URL.
getBrands

Let me know if you require further clarity or examples above.

p.s I've done exactly what you're asking a few times now, so just know it can be done, keep asking if you get stuck along the way.

Cheers,

Stephen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines