Forums

How to attach url for current page to form?

Zelda 12 Aug, 2008
Dear all,

I have a form to send tips to friends. It works fine. Though I would like the form to automatically capture and pass along the exact url to the page that the friend is sending a tip about. Is that possible? Note, it will not be the same all the time, but different depending on which page the tip will be sent from and about.

Thanks!

Zelda

🙂
Max_admin 12 Aug, 2008
maybe you can ad the tip in a hidden field ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Zelda 14 Aug, 2008
Hi,

That is possible. However, I am struggeling with the correct code.

I have tried both $_SERVER[REQUEST_URI] and $GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"]; as value for the hidden field.

Maybe I am wrong about them or placing them incorrectly. I am not a programmer.

Have any idea?

Zelda
Max_admin 14 Aug, 2008
hi Zelda,

you mean you tried
value="<?php echo $_SERVER['REQUEST_URI']; ?>"
?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Zelda 15 Aug, 2008
Hi,

Now I tried and it seems to work. 🙂

Thank you very much!

Zelda
This topic is locked and no more replies can be posted.