Help needed passing variable to...
Hi all,
I have looked through other posts relating to passing variables into WBD however due to current ilness I am unable to process information as well as used to do so any help with this would be appreciated. I do not know php coding so help will need to be at a basic level if possible.
My situation is this;
I have a php page which populates from information in a sql database. This (detail) page relates to accommodation and the information on the page is determined from a previous link containing a summary of different accommodations.
ie we have a summary of accommodation on one page and links on the page open the detail page populating it with info for the chosen accommodation.
What I want to do is use WFB to add a simple booking enquiry form to the detail pagehowever it is proving more difficult than just adding a simple form in dreamweaver.
The accommodation detail page includes the variable <?php echo $self_cateringRecord['email'] ?> to display the accommodation email address, I would like to be able to use this variable as the "to" field which WFB places in the form.cfg.php to ensure that the completed form data is transmitted to whichever accommodation is being viewed by the user, however looking at the forum posts it doesnt look as though this is as straightforward as simply replacing the email address with the variable in form.cfg.php as I had hoped.
Is there a simple way to achieve this as I would prefer to use WFB if it can be done simply.?
Thanks in advance for any help.
I have looked through other posts relating to passing variables into WBD however due to current ilness I am unable to process information as well as used to do so any help with this would be appreciated. I do not know php coding so help will need to be at a basic level if possible.
My situation is this;
I have a php page which populates from information in a sql database. This (detail) page relates to accommodation and the information on the page is determined from a previous link containing a summary of different accommodations.
ie we have a summary of accommodation on one page and links on the page open the detail page populating it with info for the chosen accommodation.
What I want to do is use WFB to add a simple booking enquiry form to the detail pagehowever it is proving more difficult than just adding a simple form in dreamweaver.
The accommodation detail page includes the variable <?php echo $self_cateringRecord['email'] ?> to display the accommodation email address, I would like to be able to use this variable as the "to" field which WFB places in the form.cfg.php to ensure that the completed form data is transmitted to whichever accommodation is being viewed by the user, however looking at the forum posts it doesnt look as though this is as straightforward as simply replacing the email address with the variable in form.cfg.php as I had hoped.
Is there a simple way to achieve this as I would prefer to use WFB if it can be done simply.?
Thanks in advance for any help.
How about hiding a email field in your form and populating that with the variable. Then you can using the built in confirmation email to send.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Hi Eric,
thanks for the response, I have tried that by creating a hidden field with the email variable <?php echo $self_cateringRecord['email'] ?> as the value, this is the variable used to display the email address on the advertisers page. However if I go to the notification settings, unlike the confirm email it doesnt have a dropdown box to select a form element as the value, I have to type an email address in manually and it errors if it doesn't think it is a valid email so cannot place a variable there.
I had hoped that the form would just populate with the other variable values used on the host page but that doesn't seem to happen. As the hidden fields are hidden I cannot see if the form actually picks up the variable value or not.
So I still have two issue, well three if you include not knowing php, a) how do I get the notification "To" field to work with a variable and how do I confirm whether the form is actually picking up and transposing the variable(s) correctly.
I tried just creating a read only text field using the variable as the placeholder but when loaded the field was just blank so am completely stuck at the moment.
Thanks in advance for any further help provided on this.
thanks for the response, I have tried that by creating a hidden field with the email variable <?php echo $self_cateringRecord['email'] ?> as the value, this is the variable used to display the email address on the advertisers page. However if I go to the notification settings, unlike the confirm email it doesnt have a dropdown box to select a form element as the value, I have to type an email address in manually and it errors if it doesn't think it is a valid email so cannot place a variable there.
I had hoped that the form would just populate with the other variable values used on the host page but that doesn't seem to happen. As the hidden fields are hidden I cannot see if the form actually picks up the variable value or not.
So I still have two issue, well three if you include not knowing php, a) how do I get the notification "To" field to work with a variable and how do I confirm whether the form is actually picking up and transposing the variable(s) correctly.
I tried just creating a read only text field using the variable as the placeholder but when loaded the field was just blank so am completely stuck at the moment.
Thanks in advance for any further help provided on this.
To see hidden values look at the page source code by hitting f12. I the variable was populated it will show there.
Do you have your server setup to parse php inside html?
Do you have your server setup to parse php inside html?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Hi Eric, yes html files will parse php, because of the complex setup I can only work on live pages which is a pain so have had to remove the code again due to it not working, I did contact support re the issue and was told that it would need coding through the backend after exporting the form but I havent a clue what that entails and it obviously falls outside their normal support parameters.
I guess I somehow have to open the sql file somewhere within the form that is called into the iframe in order for the variables to mean anything I obviously need someone conversant with php to help solve this as I am out of my depth.
I guess I somehow have to open the sql file somewhere within the form that is called into the iframe in order for the variables to mean anything I obviously need someone conversant with php to help solve this as I am out of my depth.
Steve Moxon wrote:
Hi Eric,
thanks for the response, I have tried that by creating a hidden field with the email variable <?php echo $self_cateringRecord['email'] ?> as the value, this is the variable used to display the email address on the advertisers page. However if I go to the notification settings, unlike the confirm email it doesnt have a dropdown box to select a form element as the value, I have to type an email address in manually and it errors if it doesn't think it is a valid email so cannot place a variable there.
Hi Eric,
thanks for the response, I have tried that by creating a hidden field with the email variable <?php echo $self_cateringRecord['email'] ?> as the value, this is the variable used to display the email address on the advertisers page. However if I go to the notification settings, unlike the confirm email it doesnt have a dropdown box to select a form element as the value, I have to type an email address in manually and it errors if it doesn't think it is a valid email so cannot place a variable there.
I meant to use a standard email element and add custom css to hide the element
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Hi Eric,
Thank you for your suggestions, it seems that what I assumed would be a simple implementation is going to be a nightmare. My lack of coding skills means that I may have to abandon using WFB for this project. The alternative is that I repost the issue looking for someone who would be able resolve the issue for me for a fee. With all the facilities WFB provides, Who would have thought that something as simple as using a variable to dictate where the form is sent could be such an issue. Given your depth of experience within the forum can you suggest anyone you feel would be able to provide a solution at a reasonable fee?
Thanks in advance.
Thank you for your suggestions, it seems that what I assumed would be a simple implementation is going to be a nightmare. My lack of coding skills means that I may have to abandon using WFB for this project. The alternative is that I repost the issue looking for someone who would be able resolve the issue for me for a fee. With all the facilities WFB provides, Who would have thought that something as simple as using a variable to dictate where the form is sent could be such an issue. Given your depth of experience within the forum can you suggest anyone you feel would be able to provide a solution at a reasonable fee?
Thanks in advance.
What kind of timeline are you looking at?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Hi Eric,
there is no deadline for this, cost is the most important element as the facility is for a community website which survives via low cost advertising for local businesses although we still end up having to subsidise it ourselves. Nonetheless we want to do the best we can for the people who support the site.
I could create a basic form myself within dreamweaver quite easily which would work fine including the need to use the variables for the destination address but if at all possible I wanted to to utilise the bells and whistles within WFB such as the nicely formatted emails to both recipient and enquirer and the built in css formatting for the form itself which all helps to provide a more professional look.
I know that the form etc couldn't be hosted on CC,s web space but hosting the php etc on our own domain wouldn't, be an issue? My thoughts were that all that would be needed was for the form to pick up the value of the variable already available on the host page, save the value within a hidden field within the form. It would then require removing the line of code in the appropriate WFB php file responsible for sending the emails which by default is hard coded from the information entered in the "to" address within the the form settings area, and replacing it with code which picks the to address from the hidden field in the form at the same time that it creates the email contents from the remaining form content.
Sounds simple when you don't have to code it doesn't it :-) I am sure that it would be much easier if WFB didn't check email address validity for the recipient field within the form settings so that a variable could be used if needed in the same way that the confirmation to enquirer email address is picked from the form content.
As I say, it sounds simple in theory, if you think it can be done without too much expense please advise, if there is a lot of work likely to be involved then I will just have to code a basic form without the whistles and bells available via WFB which I could have up and running in around an hour.
Again thanks for taking the time to review my tales of woe and taking the time to respond.
Regards
Steve
there is no deadline for this, cost is the most important element as the facility is for a community website which survives via low cost advertising for local businesses although we still end up having to subsidise it ourselves. Nonetheless we want to do the best we can for the people who support the site.
I could create a basic form myself within dreamweaver quite easily which would work fine including the need to use the variables for the destination address but if at all possible I wanted to to utilise the bells and whistles within WFB such as the nicely formatted emails to both recipient and enquirer and the built in css formatting for the form itself which all helps to provide a more professional look.
I know that the form etc couldn't be hosted on CC,s web space but hosting the php etc on our own domain wouldn't, be an issue? My thoughts were that all that would be needed was for the form to pick up the value of the variable already available on the host page, save the value within a hidden field within the form. It would then require removing the line of code in the appropriate WFB php file responsible for sending the emails which by default is hard coded from the information entered in the "to" address within the the form settings area, and replacing it with code which picks the to address from the hidden field in the form at the same time that it creates the email contents from the remaining form content.
Sounds simple when you don't have to code it doesn't it :-) I am sure that it would be much easier if WFB didn't check email address validity for the recipient field within the form settings so that a variable could be used if needed in the same way that the confirmation to enquirer email address is picked from the form content.
As I say, it sounds simple in theory, if you think it can be done without too much expense please advise, if there is a lot of work likely to be involved then I will just have to code a basic form without the whistles and bells available via WFB which I could have up and running in around an hour.
Again thanks for taking the time to review my tales of woe and taking the time to respond.
Regards
Steve
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.