How to know the form is accessed via the edit link?

  • dellquaysc
    Asked on March 31, 2016 at 5:44 AM

    I was trying to work out how to know that the form was being edited as I wanted to activate a field only when the form was being edited and I came across this post

    http://www.jotform.com/answers/265107-How-to-use-URL-parameters-with-edit-link-of-form-edit-mode-/?entrymessage=10732640770

    In here one of your guys tells us that behind the scenes there are 2 PHP scripts. One run on the first entry of data and a second script which is run when a user is editing data they previously created after clicking the {EDIT LINK}

    Specifically this statement:

    ------------------------------------------------------------

    When edit link is used, it loads a different php file which is not designed to read url query strings and only reads the value from database.

    -------------------------------------------------------------

    Well if that is the case then it would seem quite a simple process for the "EDIT" script to make available a "MODE_EDIT" variable to the form so that we could test that variable existed and if it does we know that the form has been activated from the {EDIT LINK}

    I see that I am not the only person that would be pleased to see such an addition, and it would not seem to be Rocket Science to provide it!

    Can you pass this along to the developers as a "Why didnt we think of this years ago"

  • mert JotForm UI Developer
    Replied on March 31, 2016 at 10:15 AM

    Actually, you can trace this by enabling the "Submission ID" on the email submission. Since the edited submissions are sent to your side again with the renamed title starts with "EDIT: ...", you can easily find which submission is edited by cross checking the IDs.

     

    Firstly, add the "Submission ID" to your "Notification":

    How to know the form is accessed via the edit link? Image 1 Screenshot 30

     

    Then, when the form is edited you can see the title and the ID, so you can identify the edited submission among your other submissions.

    Please, see it from the below:

    How to know the form is accessed via the edit link? Image 2 Screenshot 41

     

    I hope this one will work for you. Please, do let us know your ideas about it.

    Regards.

  • dellquaysc
    Replied on March 31, 2016 at 3:53 PM

    Hi,

    I think you misunderstood my requirement.

    I want to be able to make a field on the form visible "if and only if" the form is being edited.

    So when the user first uses the form the field will be hidden, but it they come back and amend the form they will see the hidden field.

  • David JotForm Support Manager
    Replied on March 31, 2016 at 5:42 PM

    Unfortunately, the "show/hide" condition feature is not supported to show a field if the form is loaded on edit mode. 

     

    If you need anything else, please open a new thread, we will be glad to assist you.