javascript - Set predefined subject and text for contact form on button click -
i trying following think dont have clue how work properly:
on page products.html have products buttons order. buttons redirect contact form , set defualt subject , text.
e.g: if click on "order computer" redirected contact page form , form contain filled datas.
subject: "computer order"
text: "i make order..."
this how button looks like
<a class="dc_c3b_large dc_c3b_orange dc_button" href="/contact.html?subject="computer"><span style="font-size:25px !important">objednaj!</span></a>
and form
<form action="contact.php" method="post" id="contactform_main"> ... <label for="subject">predmet*</label> <input id="subject" name="subject" class="text"/> <input type="submit" name="imagefield" value="submit" class="send" /> </form>
is possible html or need javascript?
if able use php able this. far using javascript or html not believe so. if have php enabled use code on contact page.
change form method 'get' in contact form have along lines of this
<input type="text" name="subject" id="subject" vaule="$_get["subject"]"/>
that should work
Comments
Post a Comment