iframe: Passing submissionID to parent app

  • nkazantzis
    Asked on January 8, 2018 at 2:09 PM

    Hello,

    I am trying to use JotForms within another application, where someone (on mobile) fills in a form, and a supervisor (on mobile or laptop) reviews and approves/rejects, with the user being able to see the supervisor's feedback.

    I have managed many required functions via the API or via form configuration. However there are some things that I have not been able to do:
    - The form is embedded as an iframe into the user's mobile app (custom app). This means that although I can display the form submission ID on the thank you page, crossdomain limitations do not allow me to transfer this ID to the "parent" component (the mobile app). I need to do this so I can store/display the submission ID for future reference.
    I have seen webhooks and php mentioned, but these are more complex than I need, I simply need something like a postmessage widget to SEND the submission ID to the parent app/page. Is there such a feature, or some other method to do this ?

    - I need some way to give the supervisor access to only a subset of the available form Submissions, and with limited rights. Currently if I login and go to Submissions, I see everything, I can view all forms but I can also do dangerous things like delete forms etc.
    Is there a way to view the Submissions screen (showing individual but also grid-like submission data), allowing someone to view/update form data and instances, but without all the other capabilities on the JotForm admin page ? I.e. not creating new forms, not changing existing ones, just viewing the data and providing updates.

    Thank you.

  • aubreybourke
    Replied on January 8, 2018 at 3:11 PM

    1) You can post your variables to a custom thank you page. Unfortunately we do not have a widget that will pass the data how you described. 

    How-to-Post-Submission-Data-to-Thank-You-Page


    2) You can use an edit link.

    First add a section for the supervisor on your form. At the very least a radio button to mark the form approved/denied. So that when a form is submitted an email goes to the supervisor containing the edit link. He clicks on the edit link, reviews the data, and selects the radio button approved/denied and resubmits the form.

    How-to-Let-Users-Update-Their-Form-Submissions-at-a-Later-Date



  • nkazantzis
    Replied on January 8, 2018 at 3:44 PM

    Thanks for your reply,

    For #1, I don't see how this is different than the standard thank you page. I can already display the variable I need there (Submission ID). The problem is that what you propose will ALSO be in the iFrame, so still NOT accessible from the "container" webpage.

    Please let me know if I have misunderstood something.


    For #2, as I mentioned, the requirement is for a Submissions-like page, not email access to a single form instance. A grid where I can see e.g. 20 submitted forms simultaneously as 20 rows, see their "status" in one column of the grid, and then click in any one of them to see the full data and update the "approved" field.

    So, what I am describing is the Submission page as it is now (i.e. a GRID+individual view), but:

    - launched with filters (so that e.g. I can look only at "Unapproved" forms, or forms submitted in the last 24 hours)

    - NO access to any other admin menus (create form, delete form, etc.).


    Let me know if this is possible in any way.

  • aubreybourke
    Replied on January 8, 2018 at 4:22 PM

    1) One possible solution is to use a custom thank you page where you post your data to your own server. That server can take the post variables and store them in a database. Then your app could retrieve the information from the database.

    2) Sounds like you are looking for the Grid Listing report. When you set it up you need to check the edit link checkbox. Then you will be able to edit the submissions.

    How-to-Create-a-Grid-Listing-Report

    Hope that helps!

  • nkazantzis
    Replied on January 8, 2018 at 4:43 PM

    For #2, I have seen the Grid Listing report, but it is not filterable AT RUN time. I cannot launch it and then filter to e.g. show only today's submissions, or e.g. to only show those submissions with field "approval" = "failed".

    For #1, as I mentioned in the first post, webhooks and post methods are methods that I cannot consider at this point due to multiple complexities that are unrelated to JotForms.

    Almost everything can be done via the API, and with the retrieved data I can create a screen like the Grid View screen that I need on my side, but it can't be done without keeping a reference to the SubmissionID for each form instance, on my side.

    Please consider adding this capability. JotForms is obviously built to support form embedding: You already offer it out of the box, you already allow us to prepopulate fields at run time, you already allow us to show the submission ID on the Thank You page. So everything needed coming from a container page to the embedded iFrame is there. There is only one part missing - giving back the form submission ID to the container page (via a .postmessage method or any other).

  • aubreybourke
    Replied on January 8, 2018 at 5:56 PM

    Ok, I have submitted a feature request for you. If there is any progress on this issue you will be notified via this thread.