Using variables (auto-populate) within the Edit Link function

  • steelneil81
    Asked on July 11, 2014 at 4:39 AM

    I would like to be able to open a submitted form for editing purposes but automatically populate a hidden field. Is this possible?

  • jonathan
    Replied on July 11, 2014 at 9:09 AM

    Hi,

    Can you please describe how you intend to do the editing process?

    Was it using the Edit_Link URL of the form? 

    Currently, pre-populating the form via URL parameter and Edit Link URL does not work together because the edit link URL is being recreated from scratch. Which means it will erase the current URL (where the pre-fill value is suppose to be).

    Describe to us first how you intend to do the Editing process and we will evaluate for the right solution that can work.

    We will wait for your updated response.

    Thanks.

     

  • steelneil81
    Replied on July 14, 2014 at 4:27 AM

    What I was hoping to achieve was to use the edit link as a part of an approval process. However, I do not want certain people to see the completed form but do the form submitted each time.

    I have put together a test form http://form.jotformpro.com/form/41893281451962

    I would like the Requester to submit information in the Request box.

    The email will be sent to the approver but when the approver opens the link I'd like the Request Complete box to be populated. The request complete box would then trigger a condition that the user jumps to the next page. Hiding the page completed by the requester.

    I hope this makes sense. I would then apply the same to the next stage.

  • jedcadorna
    Replied on July 14, 2014 at 8:56 AM

    Hello,

    Thank you for providing us the details. Here's the process that I can think of,

    1. User fills the Request field
    2. Approver will then receive an email that has the name of the requester and approver has 2 options a. Request Complete = Yes , b. Request Complete = No

    Using variables (auto populate) within the Edit Link function Image 1 Screenshot 20
    Note: Request Complete is hidden. I used a Hidde Box widget.


    3. If Approver chose a. they will be redirected to the form showing only Approval field
    4. To proceed to the next page which has Customer field approver needs to type Approved in the approval field.

    I just want to clarify after the approver fills the approval field and submits the form where will the notification be sent to? The requester or the approver?

    You may clone the form that I created and test it to see if this process is correct http://form.jotformpro.com/form/41943579657976.  A guide on how to clone an existing form https://www.jotform.com/help/42-How-to-clone-an-existing-form-from-a-URL

  • steelneil81
    Replied on July 14, 2014 at 9:08 AM

    Hi,

    This seems to give me the result I was after. So, to apply the same to a larger form, I need to map all the fields into the link?

  • steelneil81
    Replied on July 14, 2014 at 9:50 AM

    Is it just me doing something wrong or does it not populate an email field properly?

  • jonathan
    Replied on July 14, 2014 at 10:58 AM

    Hi,

    Please tell us what was the URL you were referring to. I checked the demo form of our colleague jedcardorna and this were the URL in the email.

     

    http://form.jotformpro.com/form/41943579657976?requestComplete14=Yes&request={request}

    http://form.jotformpro.com/form/41943579657976?requestComplete14=No&request={request}

     

    Tell us the form you were working on, and we will assist you on how you can pre-populate the field via URL parameter.

    Thanks.

     

  • steelneil81
    Replied on July 14, 2014 at 11:18 AM

    The form I have been working on is:

    http://form.jotformpro.com/form/41942526708964

    The approval email has the correct link (first one in the email).

     

    I have resolved the issue with the email fields not populating. It appears that it does not work when there is a hint example. I am now having an issue whereby some fields in the Common section do not populate even though they are mapped in the URL. The ones causing an issue are the C1 to C6 fields.

  • David JotForm Support
    Replied on July 14, 2014 at 12:24 PM

    Hi,

    It appears you are trying to populate the hidden C1-C6 fields from the shown C1-C6 fields.  Unfortunately the form treats hidden fields as if they are not there.  You will see that if you don't hide those fields, the population does indeed work:

    Using variables (auto populate) within the Edit Link function Image 1 Screenshot 20

    However it will not populate the hidden field as it does not appear within the scope of the shown fields.  Please let us know if you have any other questions and we will be happy to help.

    Thank you for using Jotform!

  • steelneil81
    Replied on July 15, 2014 at 6:28 AM

    I am still having issues with creating a url that will autopopulate the form from a link.

    Is there a limit to the length of the url? Are there any characters I should avoid?

     

    If I hover over the link in the email once it has been received it shows the full url with the correct values in the placeholders. However, if I click the link, nothing happens.

  • jedcadorna
    Replied on July 15, 2014 at 8:01 AM

    We'll check the form and get back to you. Needs to run a few test. Can you provide all fields that does not populate, that would help us testing your form. Is it still C1-C6 fields that are not populating?

    Thanks,

  • VCE
    Replied on July 15, 2014 at 12:00 PM

    Nothing is populating as the link doesn't work

  • jedcadorna
    Replied on July 15, 2014 at 12:20 PM

    Hello,

    I have cloned your form and your link works fine when clicked in my email. Kindly test this form http://form.jotformpro.com/form/41953240781960 and fill the email field with your email as I set an autoresponder so that you will receive the approval notification that has the "Click to Approve/Decline" field.

    Using variables (auto populate) within the Edit Link function Image 1 Screenshot 20

    I can't test your actual form since you have conditions that will trigger an email and I won't be able to receive those notification to see the actual link created by your form, but the form that I've cloned from you shows that the URL populates value. You can see the C1-C6 populates the value using the "Click to Approve/Decline" field.

  • VCE
    Replied on July 16, 2014 at 4:12 AM

    OK, I've tried your form and my form and still cannot open the link in the email. However, i've I read my email on my iphone and click the link, it works.

    Would you know of any reason for this happening?

     

    Interestingly, other links work in the same email.

  • Aytekin JotForm Founder
    Replied on July 16, 2014 at 7:09 AM

    My guess is that it is happening because the entered data might contain spaces and other characters. So, they need to be URL encoded for them to work properly. Here is what the link looks like:

    http://form.jotformpro.com/form/41942526708964?requestNo={requestNo}&status=Approval&name={name}&requester={requester}&depot={depot}&typeOf={typeOf}&companyName={companyName}&customerName={customerName}&customerEmail={customerEmail}&accountNumberMain={accountNumberMain}&morethanoneaccount={morethanoneaccount}&associatedAccount={associatedAccount}&common1={common1}&common2={common2}&common3={common3}&common4={common4}&common5={common5}&common6={common6}&specialTermCommon={specialTermCommon}&amountCommon={amountCommon}&otherCommon={otherCommon}&additionalCommentsCommon={additionalCommentsCommon}&internalCommentsCommon={internalCommentsCommon}&general1={general1}&general2={general2}&general3={general3}&general4={general4}&general7={general7}&specialTermGeneral={specialTermGeneral}&amountGeneral={amountGeneral}&otherGeneral={otherGeneral}&additionalCommentsGeneral={additionalCommentsGeneral}&internalCommentsGeneral={internalCommentsGeneral}&road1={road1}&road2={road2}&road3={road3}&road4={road4}&road5={road5}&specialTermRoad={specialTermRoad}&amountRoad={amountRoad}&otherRoad={otherRoad}&additionalCommentsRoad={additionalCommentsRoad}&internalCommentsRoad={internalCommentsRoad}&utility1={utility1}&utility2={utility2}&utility3={utility3}&utility4={utility4}&utility5={utility5}&utility8={utility8}&specialTermUtility={specialTermUtility}&amountUtility={amountUtility}&otherUtility={otherUtility}&additionalCommentsUtility={additionalCommentsUtility}&internalCommentsUtility={internalCommentsUtility}&optionLabour={optionLabour}&standardTime={standardTime}&overtime={overtime}&optionTravel={optionTravel}&travelTime={travelTime}&mileage={mileage}&ratePerVisit={ratePerVisit}&requesterConfirm={requesterConfirm}

     

    I was going to open a feature request ticket but I found out that we already have this feature! :) 

    http://www.jotform.com/help/164-How-to-Pass-Values-to-the-Text-Area-of-a-Form-via-URL-encoding

     

    So, this is how you should include the fields:

     

    http://form.jotformpro.com/form/41942526708964?requestNo={URLENCODE:requestNo}&status=Approval&name={URLENCODE:name}&requester={URLENCODE:requester}&depot={URLENCODE:depot}&typeOf={URLENCODE:typeOf}&companyName={URLENCODE:companyName}&customerName={URLENCODE:customerName}&customerEmail={URLENCODE:customerEmail}&accountNumberMain={URLENCODE:accountNumberMain}&morethanoneaccount={URLENCODE:morethanoneaccount}&associatedAccount={URLENCODE:associatedAccount}&common1={URLENCODE:common1}&common2={URLENCODE:common2}&common3={URLENCODE:common3}&common4={URLENCODE:common4}&common5={URLENCODE:common5}&common6={URLENCODE:common6}&specialTermCommon={URLENCODE:specialTermCommon}&amountCommon={URLENCODE:amountCommon}&otherCommon={URLENCODE:otherCommon}&additionalCommentsCommon={URLENCODE:additionalCommentsCommon}&internalCommentsCommon={URLENCODE:internalCommentsCommon}&general1={URLENCODE:general1}&general2={URLENCODE:general2}&general3={URLENCODE:general3}&general4={URLENCODE:general4}&general7={URLENCODE:general7}&specialTermGeneral={URLENCODE:specialTermGeneral}&amountGeneral={URLENCODE:amountGeneral}&otherGeneral={URLENCODE:otherGeneral}&additionalCommentsGeneral={URLENCODE:additionalCommentsGeneral}&internalCommentsGeneral={URLENCODE:internalCommentsGeneral}&road1={URLENCODE:road1}&road2={URLENCODE:road2}&road3={URLENCODE:road3}&road4={URLENCODE:road4}&road5={URLENCODE:road5}&specialTermRoad={URLENCODE:specialTermRoad}&amountRoad={URLENCODE:amountRoad}&otherRoad={URLENCODE:otherRoad}&additionalCommentsRoad={URLENCODE:additionalCommentsRoad}&internalCommentsRoad={URLENCODE:internalCommentsRoad}&utility1={URLENCODE:utility1}&utility2={URLENCODE:utility2}&utility3={URLENCODE:utility3}&utility4={URLENCODE:utility4}&utility5={URLENCODE:utility5}&utility8={URLENCODE:utility8}&specialTermUtility={URLENCODE:specialTermUtility}&amountUtility={URLENCODE:amountUtility}&otherUtility={URLENCODE:otherUtility}&additionalCommentsUtility={URLENCODE:additionalCommentsUtility}&internalCommentsUtility={URLENCODE:internalCommentsUtility}&optionLabour={URLENCODE:optionLabour}&standardTime={URLENCODE:standardTime}&overtime={URLENCODE:overtime}&optionTravel={URLENCODE:optionTravel}&travelTime={URLENCODE:travelTime}&mileage={URLENCODE:mileage}&ratePerVisit={URLENCODE:ratePerVisit}&requesterConfirm={URLENCODE:requesterConfirm}

    If you still have problems let me know the URL you get so that we can find out where it is getting broken.

    If the problem is the length of the URL, then we should open a feature request ticket for a tag that can shorten URLs just like tinyurl does. 

  • VCE
    Replied on July 16, 2014 at 12:28 PM

    Hi,

    I've tried this an when the notification email is sent to my email address in Outlook the link does not open when click. No am I able to copy to hyperlink and paste the url in IE.

     

    If I receive the email in Gmail I am able to ope the link without a problem.

  • David JotForm Support
    Replied on July 16, 2014 at 12:45 PM

    Hi,

    I am not sure what may be causing this.  It appears that there is some automatic formatting going on in Gmail that is not happening in Outlook.  Your Iphone and Gmail may be filling in extra data to make things work that Outlook does not.  Please let us know the URL you get that is broken and we will see what we can do.

    Thank you for using Jotform!

  • VCE
    Replied on July 16, 2014 at 12:54 PM

    This is the url that comes through on the email. I've had to copy this from gmail after clicking on it as outlook a) wont open it and b) if you copy the hyperlink you get it witht he placeholders and not the inputs.

    http://www.jotformpro.com/41942526708964?requestNo=STA00040&status=Approval&name=test&requester=test%40test.com&depot=Duxford&typeOf=Local&companyName=test&customerName=test&customerEmail=test%40test.com&accountNumberMain=76576&morethanoneaccount=&associatedAccount=&common1=87&common2=4&common3=3&common4=&common5=&common6=&specialTermCommon=Maintain%20current%20spend%20levels&amountCommon=&otherCommon=&additionalCommentsCommon=&internalCommentsCommon=&general1=&general2=&general3=&general4=&general7=&specialTermGeneral=&amountGeneral=&otherGeneral=&additionalCommentsGeneral=&internalCommentsGeneral=&road1=&road2=&road3=&road4=&road5=&specialTermRoad=&amountRoad=&otherRoad=&additionalCommentsRoad=&internalCommentsRoad=&utility1=&utility2=&utility3=&utility4=&utility5=&utility8=&specialTermUtility=&amountUtility=&otherUtility=&additionalCommentsUtility=&internalCommentsUtility=&optionLabour=Percentage%20Discount&standardTime=&overtime=&optionTravel=Percentage%20Discount&travelTime=&mileage=&ratePerVisit=&requesterConfirm=I%20confirm%20that%20I%20fully%20understand%20the%20financial%20impact%20of%20offering%20the%20customer%20these%20special%20terms

  • David JotForm Support
    Replied on July 16, 2014 at 1:16 PM

    Hi,

    I am not 100% where the issue is coming from.  I have submitted a bug ticket to see if someone else may be able to find out where things are breaking down.  Below is just a block version of your URL.

    http://www.jotformpro.com/41942526708964?requestNo=STA00040&status=Approval&name=test&requester=test%40test.com&
    depot=Duxford&typeOf=Local&companyName=test&customerName=test
    &customerEmail=test%40test.com&accountNumberMain=76576
    &morethanoneaccount=&associatedAccount=&common1=87
    &common2=4&common3=3&common4=&common5=&common6=
    &specialTermCommon=Maintain%20current%20spend%20levels
    &amountCommon=&otherCommon=&additionalCommentsCommon=
    &internalCommentsCommon=&general1=&general2=&general3=&general4=
    &general7=&specialTermGeneral=&amountGeneral=&otherGeneral=
    &additionalCommentsGeneral=&internalCommentsGeneral=&road1=&road2=&road3=
    &road4=&road5=&specialTermRoad=&amountRoad=&otherRoad=&additionalCommentsRoad=
    &internalCommentsRoad=&utility1=&utility2=&utility3=&utility4=&utility5=&utility8=&specialTermUtility=
    &amountUtility=&otherUtility=&additionalCommentsUtility=&internalCommentsUtility=
    &optionLabour=Percentage%20Discount&standardTime=&overtime=
    &optionTravel=Percentage%20Discount&travelTime=&mileage=&ratePerVisit=
    &requesterConfirm=I%20confirm%20that%20I%20fully%20understand%20the%20financial%20impact%20of%20offering%20the%20customer%20these%20special%20term

  • VCE
    Replied on July 17, 2014 at 5:30 AM

    It looks as though the issue with the link was the final paramter {requesterConfirm}.

    This field had spaces within it so I assume this was affecting the link. Although, it doesn't answer the question regarding why it affected Outlook and not other methods of email (iPhone, Gmail etc)

  • VCE
    Replied on July 17, 2014 at 6:07 AM

    Looks like I've jumped the gun a little. It has gone back to not working

  • VCE
    Replied on July 17, 2014 at 6:45 AM

    ok. I've been doing some testing and it would appear that when the data includes spaces the link doesn't work.

    How can I avoid spaces in the answers?

  • VCE
    Replied on July 17, 2014 at 7:57 AM

    Ok... a little more testing and the issue is with the dropdowns, radio buttons and checkboxes where the answer is more than one word.

     

    If I enter a multiple word answer into a text box the url adds the %20 between each word. How can i do this with preset values?

  • jedcadorna
    Replied on July 17, 2014 at 8:10 AM

    We'll check the URL you provided above and we'll get back to you. Need to setup an outlook to test this. You mention that this only happens in outlook?

    Thank you for your patience.

  • jedcadorna
    Replied on July 18, 2014 at 6:58 AM

    Sorry for the late response. The issue with the unclickable link in outlook is the limitation that outlook has. Base on my testing it is not the requesterConfirm parameter but its the number of of the characters that outlook allows. Your prepopulate URL is correct.

    Your prepopulate URL when link is created in notification has a total which is more than 1033 this is without filling all other fields, but when you remove the requesterConfirm parameter but fill the fields and exceeds the 1033 outlook URL limits it the URL will not work.

    The main issue here is the limitation with outlook. Here's some of the information that I found while browsing and testing this case.

    Outlook 2013 – According to them there is no limitation.
    Outlook 2010 – 1033 characters
    Outlook 2007 – 1033 characters
    Outlook 2003 – 256 characters

    Regardless of how many characters your browser allows still the limit with outlook URL applies. Like if you are using google, firefox etc. which can hold 64k up to 100k characters for URL. You can also make some testing on your end and make sure to count the characters that the URL generates.

  • VCE
    Replied on July 21, 2014 at 8:01 AM

    Are there any plans to be able to create a short code link that would still contain the information from the form?
  • jedcadorna
    Replied on July 21, 2014 at 8:26 AM

    I have created a request in this thread http://www.jotform.com/answers/406142 to have a feature that will allow user to shorten URL. We'll notify you on that thread for updates.