Passing value to complicated form field

5 replies
I have this stupidly complicated Form Field which I'm trying to pass variables to.



This is the form....the field I'm struggling with is the very last field ('Referral').

https://listings.quipmo.com/en/signup


Any ideas how I'd structure the URL to pass a value to it?


The form must be using a GET method as other fields (such as 'Name') can successfully get passed values via a query string. The problem is the other fields have a cleaner naming convention than the one that I've shared above which isn't so clean!


It's based on a Sharetribe backend....
#complicated #field #form #passing
  • Profile picture of the author Mehdi Fracso
    Hi @thefreedomchaser,
    what do you mean by pass variable to ?
    Do you mean collecting the value that a user types into this field (Referral in your case) ?

    I can help you but there isn't enough details in your post
    {{ DiscussionBoard.errors[11657493].message }}
    • Profile picture of the author thefreedomchaser
      Thanks for your offer to help. Basically I want to create URL that includes the 'referral' field within it, so that I can share it with our ambassadors and know when they refer a new user.
      {{ DiscussionBoard.errors[11657746].message }}
      • Profile picture of the author railsdev138
        Hey thefreedomchaser,

        Where you lose me is how are you getting this ID to begin with? What languages are you working with? How are you processing your form? What is the workflow from customer to form submission and beyond?

        If you're using Sharetribe, they should send back JSON objects with the pertinent information. Then when you process your form, you should be able to use any of the fields in the API response to get what you need.

        So, take a look at how you're handling the API responses and if possible give a detailed work flow process.
        {{ DiscussionBoard.errors[11657834].message }}
  • Profile picture of the author Alfredo Oyanadel
    I can also help out with some more info.
    Had a quick look, and the form itself sends a POST

    So I'm guessing you are receiving a GET request, which you are to pre-populate the fields with?

    Assuming the above, you'll just have to map the incoming indexes with the ID or names you have in the form.

    Not knowing what you are generating the form with, one last resort could be to do the mapping and inject javascript to populate the fields...


    Just my two cents, based on some guesses..
    {{ DiscussionBoard.errors[11657939].message }}
  • Profile picture of the author MartinPlatt
    Yep, you could do this with some code on the client side to read the query strings you pass in through the url, and set the values in the forms.

    Here is an article... https://stackoverflow.com/questions/...alues-from-url
    Signature

    Martin Platt
    martin-platt.com

    Stuck with earning commissions online? Get this get this uncensored affiliate marketing guide for free (sold as coaching for $4,997)

    {{ DiscussionBoard.errors[11671237].message }}

Trending Topics