Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Variables and input fields in a form
Old 11-27-2009, 04:42 AM Variables and input fields in a form
Junior Talker

Posts: 1
Trades: 0
Not sure if this is right section, please move if it's wrong.
See the following:
Code:
<form action="{$config.base}{$config.dir}search.php" method="get">

  <input type="text" class="text" name="1" id="1" size="22"/>
  <input type="text" class="text" name="2" id="2" size="22"/>

    {assign var="1" value='input[id^=1]'}
    {assign var="2" value='input[id^=2]'}
    {assign var="whatwhere" value="$1""$2"} 

  <input:hidden class="text" name="what" id="what" size="22" 
  value="{$smarty.get.what|escape:"{$whatwhere}"}"/> 
  <input type="submit" value="{$lang.search}" class="button" />

</form>
Basically what I am trying to do in this form is take the field's, "1" & "2", values and combine them to be the value in the "what" hidden input.

Can someone tell me what I'm doing wrong and what to do to get it working.

Thanks
Dylan
djtreble is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-27-2009, 07:23 AM Re: Variables and input fields in a form
Super Talker

Posts: 139
Name: John Davis
Trades: 0
Wrong
Code:
<input:hidden
Right:
Code:
<input type="hidden"
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Old 12-11-2009, 03:57 PM Re: Variables and input fields in a form
Junior Talker

Posts: 2
Name: Martin
Trades: 0
Or

<input style="display:none" ...
dakolar71at is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Variables and input fields in a form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16055 seconds with 12 queries