Input fields and variables in a form

Discussion in 'Programming' started by djtreble, Nov 27, 2009.

Thread Status:
Not open for further replies.
  1. djtreble New Member

    Member Since:
    Nov 27, 2009
    Message Count:
    1
    Likes Received:
    0
    Not sure if this is right section, please move if it's wrong.
    See the following:
    Code (text):

    <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
  2. okapopin New Member

    Member Since:
    Dec 21, 2009
    Message Count:
    115
    Likes Received:
    4
    I did found any wrong..
Thread Status:
Not open for further replies.

Share This Page