If you followed David’s suggestion and have product=thingamabob in your URL (when they have pressed the enquire button) then you can test for that variable and use it to hide/show the picker. The one thing you have to be careful of at this point is to have the layout close up the hole around the missing picker. This means either a drawn table holding your form elements, or a full-on inline layout, with nested elements, so that if the field is missing, everything just scoots up to hide the fact.
Here’s a way to do this based on the assumption that you are using a table, and that you have followed the pattern of having two columns in that table, with labels in the left column and form fields in the right. (This is Best Practices for Freeway anyway, as it works around the lack of proper form labels.)
Click in one of the cells of the table within the row containing your picker. In the Inspector, locate the Row Attributes area. Click on the Markup button, and you’ll see something very similar to the Page / HTML Markup dialog, with options to add code outside of the TR or inside the TR. Choose Before TR, and enter something like this (adjusted for your actual variable name):
<?php if(isset($_GET['product'])) { ?>
Now switch to the After TR editor and enter the other half of the code:
<?php } ?>
That’s it. Now if the variable is present in the browser’s querystring (the part after the ? in the URL) this entire row will appear. If the variable is not there, the entire row will be gone. Everything below that will shrink up to fit neatly below the preceding row and nobody will be the wiser. Naturally, change the name of the variable to match whatever you’re actually using.
Walter
On Jan 16, 2012, at 9:24 AM, BigG wrote:
OK, I have that working which is great.
If a user goes to the contact page WITHOUT clicking the enquire button, I obviously don’t want the ‘You selected: xxx’ field in there - is there a piece of code to add to it to hide it unless coming from the ‘enquire’ button?
Thanks
Nathan
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options