Form Help

TOPIC:

Populate field with previous page title 4 days 12 hours ago #243753

  • Topic Author
  • nico1979
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 3
  • Thanks: 0
Hi,
Is it possible to automatically fill an hidden field with the title of the previous page I've visited?
Exemple:
I'm in the page with title "Apple" and I click "contact us" link. When I open the "contact us" page, in the From there is an hidden field called "Apple"
Thank you

Please Log in or Create an account to join the conversation.

Last edit: Post by nico1979.

Populate field with previous page title 4 days 9 hours ago #243767

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9069
  • Karma: 167
  • Thanks: 737
Hi,

please try this as default value for the hidden field:
<?php return htmlentities($_SERVER['HTTP_REFERER'], ENT_QUOTES; 'UTF-8'); ?>

Regards,
Markus

Please Log in or Create an account to join the conversation.

Last edit: Post by TheMuffinMan.

Populate field with previous page title 4 days 8 hours ago #243772

  • Topic Author
  • nico1979
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 3
  • Thanks: 0
Thank you,
if I copy your code
<?php return htmlentities($_SERVER, ENT_QUOTES; 'UTF-8'); ?>

the "contact" page gives me an error:
0 - syntax error, unexpected ';', expecting ')'

but if i change the syntax to :
<?php return htmlentities($_SERVER, ENT_QUOTES); ?>
the field is populated by the previous URL.
This is a big step forward. It would be amazing if the field will be populated by the title of the previous page.
Thank you

Please Log in or Create an account to join the conversation.

Last edit: Post by nico1979.

Populate field with previous page title 4 days 8 hours ago #243780

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9069
  • Karma: 167
  • Thanks: 737
sorry, my mistake:
<?php return htmlentities($_SERVER['HTTP_REFERER'], ENT_QUOTES, 'UTF-8'); ?>

Should work now.

Regards,
Markus

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.047 seconds

July Sale!

Discounts for all of our extensions + support. Ending July 31st!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!