Jump to content

Custom client fields adjustment


Hostmag

Recommended Posts

Hello

 

I added some client custom fields that are displayed on register and checkout pages.

 

The code from clientregister.tpl that displays custom fields is:

 

{if $customfields}

{foreach from=$customfields key=num item=customfield}

<div class="form-group">

<label class="control-label" for="customfield{$customfield.id}">{$customfield.name}</label>

<div class="control">

{$customfield.input} {$customfield.description}

</div>

</div>

{/foreach}

 

 

The custom fields are displayed subducted. How can i change the piece of code so these fields are displayed like in a table (for example: 2 columns and 3 row - taking into account that I added 6 custom fields).

 

Thank you

Link to comment
Share on other sites

this will display two fields per row

<div class="row">
{foreach from=$customfields key=num item=customfield}
<div class="col-xs-6">
   <div class="form-group">
       <label class="control-label" for="customfield{$customfield.id}">{$customfield.n ame}</label>
       <div class="control">
       {$customfield.input} {$customfield.description}
       </div>
   </div>
</div>
{/foreach}
</div>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated