passing parameters or page being viewed "id/name" with emails
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
passing parameters or page being viewed "id/name" with emails
What I am doing is using one Comment Form, on multiple pages, and would like to know what page was active when user clicked on Comment Form to send me comments...
If I include ?x=Index or ?x=Page10 to the links line of the Comment Form, is there a way to see this ?x=Page10 etc appended like: www.site.com/c/comment.php?x=Page10 in messages rcvd?
If there is a better way I would be open to it...
ie if I could append to the sent data a field or something via submit button's object html ...
Anyone have suggestions?
Tnx Roy
If I include ?x=Index or ?x=Page10 to the links line of the Comment Form, is there a way to see this ?x=Page10 etc appended like: www.site.com/c/comment.php?x=Page10 in messages rcvd?
If there is a better way I would be open to it...
ie if I could append to the sent data a field or something via submit button's object html ...
Anyone have suggestions?
Tnx Roy
Re: passing parameters or page being viewed "id/name" with emails
If you have a form on each page (not a master object) you can just add a hidden field in each form and specify the page name in the value field. This will then be included in the email.
Re: passing parameters or page being viewed "id/name" with emails
Thanks for the reply...
Yes could do that ... but that would require Comment1.php comment2.php... forms for each page...
want one Comments.php linked to by each page... since have many pages
could I use FormData.Append() somehow..?...
I just do not find yet a way to easily make each page with hyperlink to Comments.php send
a page identifier with the email message..
Yes could do that ... but that would require Comment1.php comment2.php... forms for each page...
want one Comments.php linked to by each page... since have many pages
could I use FormData.Append() somehow..?...
I just do not find yet a way to easily make each page with hyperlink to Comments.php send
a page identifier with the email message..
Re: passing parameters or page being viewed "id/name" with emails
In your first post you say you have one comment form on multiple pages.
So on each separate page do you have a comment form?
If so, then you can add the hidden field to each comment form.
If not then I must have misunderstood how you have organized the pages.
So on each separate page do you have a comment form?
If so, then you can add the hidden field to each comment form.
If not then I must have misunderstood how you have organized the pages.
Re: passing parameters or page being viewed "id/name" with emails
If you have just one page with the comment form and multiple pages linking to that page then you can do the following:
Each link will have to be a full web address (External Web Address) which contains the page name:
E.g. http://www.webaddress/comments.php/?page=abcde
Then add a hidden field to the comments form that contains <?php echo $_GET['page'] ?>
I think that should work.
EDIT:
Actually you can use Page in the Project (instead of External Web Address) and add the page=abcde in URL Parameters for Internal Links.
Each link will have to be a full web address (External Web Address) which contains the page name:
E.g. http://www.webaddress/comments.php/?page=abcde
Then add a hidden field to the comments form that contains <?php echo $_GET['page'] ?>
I think that should work.
EDIT:
Actually you can use Page in the Project (instead of External Web Address) and add the page=abcde in URL Parameters for Internal Links.
Re: passing parameters or page being viewed "id/name" with emails
I think the suggestion to add <?php echo $_GET['page'] ?>
to the hidden field would work if I could get it entered correctly...
Here are my tries
in the form options...
The tab "Hidden Fields"
has Add... then Name... I put in Page
then Value... I put in <?php echo $_GET['page'] ?>
but this gives error message of
PHPMailer error: Message body empty
dito error message with form object html, at inside tag
<input type="hidden" name="Page" value="<?php echo $_GET['page'] ?>"
so... not sure what to try next...
but appreciate the tip...
to the hidden field would work if I could get it entered correctly...
Here are my tries
in the form options...
The tab "Hidden Fields"
has Add... then Name... I put in Page
then Value... I put in <?php echo $_GET['page'] ?>
but this gives error message of
PHPMailer error: Message body empty
dito error message with form object html, at inside tag
<input type="hidden" name="Page" value="<?php echo $_GET['page'] ?>"
so... not sure what to try next...
but appreciate the tip...
Re: passing parameters or page being viewed "id/name" with emails
I don't think that <?php echo $_GET['page'] ?>
is directly related to the error message:
is directly related to the error message:
Does it work when you remove the hidden field?PHPMailer error: Message body empty
Re: passing parameters or page being viewed "id/name" with emails
Yeah, you're probably right Pablo.
It seems to work for me.
Just to double check; the hidden field should look like this:
Did you enter the ID field?

free web hosting images
And the link:

free web hosting images
It seems to work for me.
Just to double check; the hidden field should look like this:
Did you enter the ID field?

free web hosting images
And the link:

free web hosting images
Re: passing parameters or page being viewed "id/name" with emails
Hooray it works now....
you were right Pablo... err msg not related to adding the hidden field...
I found that somehow the body content was not right because when
I added some html to page and then deleted it per my tries to get this working
that there must have been something left behind...
looked at source and seemed ok but when put in data and submitted got the err msg...
so recreated the form, put in the hidden field per your last messages and it works now...
Thank you both for your patient and clear help...
This will really help me keep comments straight... and it is an easy fix...
Roy
you were right Pablo... err msg not related to adding the hidden field...
I found that somehow the body content was not right because when
I added some html to page and then deleted it per my tries to get this working
that there must have been something left behind...
looked at source and seemed ok but when put in data and submitted got the err msg...
so recreated the form, put in the hidden field per your last messages and it works now...
Thank you both for your patient and clear help...
This will really help me keep comments straight... and it is an easy fix...
Roy
Re: passing parameters or page being viewed "id/name" with emails
Just one more thing Pablo!
Do you think it's worth allowing for code injection attacks by using something like the following?
<?php echo strip_tags($_GET['page']) ?>
Do you think it's worth allowing for code injection attacks by using something like the following?
<?php echo strip_tags($_GET['page']) ?>
Re: passing parameters or page being viewed "id/name" with emails
I do not think that is useful in this case, because the content of hidden fields can be modified via the browser anyway.
Re: passing parameters or page being viewed "id/name" with emails
Ah right, OK thanks.