Welcome, Guest

Populate form fields with paramater(s) from URL.
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Populate form fields with paramater(s) from URL.

Populate form fields with paramater(s) from URL. 1 year, 11 months ago #12651

I am reposting my question since I posted it in the wrong thread yesterday. Here is what I want to do:

I have a single form (that is NOT in an article). Depending on which link a visitor clicks on, I know a bit about what field values should be populated in my form.

For instance, if they click on the "Book Birthday Party" link, they will be presented with the generic "book-a-party" form, but I want the party_type field to be populated with "Birthday".

How do I do this? Where can I put the '?party_type=Birthday' param in a URL? And, if I do this, will BreezingForms be forgiving enough to automatically populate the party_type value, or do I need to alter code?

Thanks in advance.
  • songjockey
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0

Re: Populate form fields with paramater(s) from URL. 1 year, 11 months ago #12663

<?php return $_GET['party_type]; ?>


that would get the param from the url and return in to the field's value, echo does not work for some reason it displays the string else where on the page.

hope this helps
  • spencelk
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Karma: 0

Re: Populate form fields with paramater(s) from URL. 1 year, 11 months ago #12664

<?php return $_GET['party_type]; ?>


that would get the param from the url and return in to the field's value, echo does not work for some reason it displays the string else where on the page.

hope this helps
  • spencelk
  • OFFLINE
  • Senior Boarder
  • Posts: 78
  • Karma: 0

Re: Populate form fields with paramater(s) from URL. 1 year, 11 months ago #12667

Cool...now we're getting somewhere! So, a few questions remain:

1) Can I pass the param from a "menu" item? In the Menu Manager, the link points to: "index.php?option=com_facileforms", and the formname field = "bookaparty". Can I add a param somewhere on this page? Or is there another way to do this?

2) Can I just create the URL the way I normally would on a hyperlink? In other words, my BreezingForm is called "bookaparty". If I have a hyperlink called "Birthday" on my front page, how would I link directly to my form?

3) In what module do I insert the PHP code you provided?

Thanks for the help. I have more general questions, but I'll save those for another thread.
  • songjockey
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.30 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany