Page 1 of 1

new challenge for displaying a form after clicking on expanded content

Posted: Wed Feb 27, 2008 5:31 pm
by rodeto
My client wants a site where you can get some info about mortgages. If you click on a question, the answer appears (expanded text) but that expanded text also needs a link in it to a form where people can leave their Name, Phone number and email address to get more info.

If you click that link in the expanded text, the form has to appear in the same place instead of the expanded text.

I have been thinking about this but I cant find a proper solution for that. Is there anyone who can help me with this ?

Re: new challenge for displaying a form after clicking on expanded content

Posted: Sat Mar 01, 2008 2:12 pm
by lollipop27
how about passing a GET variable in the header....

like form=0 or form=1

and then in the expanded area you say:

Code: Select all

{if $smarty.get.from == 1}


her goes you form

{else}


text you wanna display

does this help??

Re: new challenge for displaying a form after clicking on expanded content

Posted: Sat Mar 01, 2008 4:41 pm
by rodeto
I have to dig into that a lot more since I am not a coder. I think I understand but I dont know how to implement it.
But thanks or the respons :)

Re: new challenge for displaying a form after clicking on expanded content

Posted: Sun Mar 02, 2008 10:46 pm
by lollipop27
Hi.... well you make a link to the form in the expanded text, right?

add the following to you link

index.php?page=xxx&form=true


where xxx is the same page as the one the link is on....



then in the expanded area you place the following code


========


{if $smarty.get.from == 'true'}

here goes the form

{else}

here goes the text that is displayed as defauled with the link to the form.....


========



{/if}