iframe: Passing submissionID to parent app

  • Profile Image
    nkazantzis
    Asked on January 08, 2018 at 02: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.

  • Profile Image
    aubreybourke
    Answered on January 08, 2018 at 03: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



  • Profile Image
    aubreybourke
    Answered on January 08, 2018 at 04: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!

  • Profile Image
    nkazantzis
    Answered on January 08, 2018 at 04: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).

  • Profile Image
    aubreybourke
    Answered on January 08, 2018 at 05: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.