Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2009
    Thanked 0 Times in 0 Posts

    strange type of form {$form.u.html}

    Hello all,

    I'm busy with altering a for to fit my needs, but at the moment I'm stuck on a dead end.

    There is a form wich I can not alter because I never see them before.

    <form {$form.attributes} class="s6l_short_url_form">
          {if $form.u.error} <span class="s6l_error_message">{$form.u.error}</span> {else} {$form.u.label} {/if}
          &nbsp;<a href="?a=y">{$txt_advanced}</a>
        {if $show_advanced_settings}
          <div style="margin-top:10px;">
             {if $form.u_id.error} <span class="s6l_error_message">{$form.u_id.error}</span><br />{else}{/if}
    Can somebody explain to me what this is and how I can edit it?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Halle (Saale), Germany
    Thanked 1,053 Times in 1,026 Posts
    The stuff in curly brackets looks like Smarty variables. Basically the HTML for hidden input fields is stored somewhere (in a database? in other files to be included?) and defined in such variables so it can be reused or altered multiple times or in different places. Also, there are some conditional statements, again in Smarty syntax.

    What you can do in the form code above is change the plain HTML but you should leave the smarty code as is. You can see the HTML output of it if you view the source in your browser. (P. S.: The hidden input fields must be in some block element, they can’t be direct children of the form. So for example do <div>{$form.hidden}</div>)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts