1

I am trying to pass a url variable from an external 3rd party site and have that variable populate an entity form text field that I have on an entity form on my company's website.

Basically we have a "Request for Information" form on our drupal site that people can come to and fill out. We have some 3rd party companies that have links to our form on their websites. We are trying to be able to track which website the person filling out the form came from so we want to add a url variable to the links on their websites so that when a user clicks on the link on their site that it takes the url variable from that link and places it in a hidden field on our drupal entity form.

Is this at all possible?

1 Answer 1

0

Yes. Checkout the Field default token module. It lets you substitute tokens in place of a field's default value. In your case you want to use [current-page:query:var] for your field's default value. This will let you send someone to the URL http://example.com/my_entity_form?var=DEFAULT which will pre populate the field with DEFAULT.

1
  • This works like a charm! Thanks Shawn for the help!!
    – Richard
    Sep 25, 2015 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.