phpmistery Posted April 3, 2019 Share Posted April 3, 2019 Hello I'm using a form to collect user data (is a Cognito form) it is displayed on vacation rental properties pages, so it collects user´s email, in date, out date, etc. However since my site https://www.bariloche.esp.br/hoteis/hosteria-no-centro-vista-ao-lago uses the same form for several properties, when someone submits, I get the information but I dont know if it comes from here https://www.bariloche.esp.br/hoteis/hosteria-no-centro-vista-ao-lago or https://www.bariloche.esp.br/hoteis/hotel-com-praia-de-lago-ha1 or any other property page. in the cognito form I have one text hidden field called REF, I wonder how to do in order to use the same form and be able to identify where the info comes from. I thougt that if I could put the page url into the REF variable, the problem would be solved, but I'm not sure if that is possible and how to do it. It is? If not: is it possible to handle that ? Quote Link to comment Share on other sites More sharing options...
ginerjm Posted April 3, 2019 Share Posted April 3, 2019 If you are making the decision when you send the page out as to what property is involved, why not have a hidden field in that same form that identifies the property for you? Perhaps an id number from your database of properties? And when you receive the form be sure to validate the hidden id against your database to avoid hackers. Quote Link to comment Share on other sites More sharing options...
phpmistery Posted April 12, 2019 Author Share Posted April 12, 2019 (edited) thanks. Quote why not have a hidden field in that same form that identifies the property for you Can you give me an example? And how do I retrieve the property id number? Edited April 12, 2019 by phpmistery Quote Link to comment Share on other sites More sharing options...
ginerjm Posted April 13, 2019 Share Posted April 13, 2019 Add a new field to the output form and use type='hidden'. Then when you received the POST'ed data, be sure to grab that field along with whatever other input fields you are grabbing. Ok? (Perhaps a quick check of your favorite HTML reference would be helpful here.) Quote Link to comment Share on other sites More sharing options...
maxxd Posted April 13, 2019 Share Posted April 13, 2019 On 4/3/2019 at 5:34 PM, phpmistery said: in the cognito form I have one text hidden field called REF What's in this field? It could just be my own personal naming style but this kinda seems like it would hold the referrer value, which sounds like what you want. So, you may have all the information you need already. Otherwise, do as ginerjm suggests and create an additional hidden field with the value you need. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.