0

in my sidebar i have block with a form where users add name of restaurant and when they cick Submit they are supposed to be redirected to a page where my webform is.

I need url like this /add-your-restaurant?key=value-from-text-field but im not sure how to pass that value in url with my form.

I have already %get[key] as default value for my Name field in webform.

This is my html form:

<form name="addres" id="addres" method="post" action="">
<span>
<input type="text" name="addresfield" class="resfield" value="Enter your Restaurant name"/>
</span>
<input type="button" class="btn"/>
</form>
  • this is not Drupal question, its normal html question. change method="post" to method="get" – Aboodred1 Apr 29 '13 at 17:15
  • How are you building the form-in-the-lock? Manual HTML or Forms API? – mpdonadio Apr 29 '13 at 20:38
0

This is solution and working form as desired.

<form name="addres" id="addres" method="get" action="add-your-restaurant">
 <span><input type="text" name="addresfield" class="resfield"
 name="key" value="Enter your Restaurant name"/></span>
<input type="submit" class="btn"/>
</form>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.