[Skip to main content](#vessel-content)

#   User registration form: Order of the field

##

- **[disc](/forum/user/35571-disc "View disc's Profile")**
- [![disc's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35571-disc "View disc's Profile") Topic Author
- [ Offline](/forum/user/35571-disc)

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 2 months ago [\#211755](#211755) by [disc](/forum/user/35571-disc "View disc's Profile")  *[User registration form: Order of the field](/forum/33-customers/878810-user-registration-form-order-of-the-field#211755 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3  Hi all,  in the default setting of the customers registration form all fields are displayed in one column. I would like to display the street and house number in one row as well as the post code and city in one row. The related php file uses a table which is not static but will be generated related to the used fields, so there is nothing that can be changed manually by editing the table. Any clue how that could work? Or is it just a simple setting that can be edited in the custom fields section and I overlooked this?  Thanks.")* was created by *[disc](/forum/user/35571-disc "View disc's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3

Hi all,

in the default setting of the customers registration form all fields are displayed in one column.
I would like to display the street and house number in one row as well as the post code and city in one row.
The related php file uses a table which is not static but will be generated related to the used fields, so there is nothing that can be changed manually by editing the table.
Any clue how that could work? Or is it just a simple setting that can be edited in the custom fields section and I overlooked this?

Thanks.

- [ ![user-registration.jpg](/forum/attachment/26023) ](/forum/attachment/26023 "...gistration.jpg") [ ](/forum/attachment/26023?download=1 "...gistration.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84Nzg4MTAtdXNlci1yZWdpc3RyYXRpb24tZm9ybS1vcmRlci1vZi10aGUtZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 2 months ago [\#211759](#211759) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[User registration form: Order of the field](/forum/33-customers/878810-user-registration-form-order-of-the-field#211759 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3  Hi all,  in the default setting of the customers registration form all fields are displayed in one column. I would like to display the street and house number in one row as well as the post code and city in one row. The related php file uses a table which is not static but will be generated related to the used fields, so there is nothing that can be changed manually by editing the table. Any clue how that could work? Or is it just a simple setting that can be edited in the custom fields section and I overlooked this?  Thanks.")*

Hi,

You'll have to edit the the custom_fields or custom_fields_bootstrap view file of the "user" view via the menu Display&gt;Views to change that.
As you say, it's not a static HTML code but dynamic so you'll need to use PHP code to modify the display in the view.
So you would skip the display of the closing div (td/tr) tags at the end of the file for the post code custom field, and you would skip the opening div (td/tr) tags at the beginning of the foreach for the city custom field. And that would make the post code and city fields display on the same line (maybe some additional CSS might be necessary to make it look nice.
In fact, with the boostrap display, you might even be able to do that with pure (albeit tricky) CSS.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84Nzg4MTAtdXNlci1yZWdpc3RyYXRpb24tZm9ybS1vcmRlci1vZi10aGUtZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[disc](/forum/user/35571-disc "View disc's Profile")**
- [![disc's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35571-disc "View disc's Profile") Topic Author
- [ Offline](/forum/user/35571-disc)

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 2 months ago -  11 years 2 months ago [\#212199](#212199) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[User registration form: Order of the field](/forum/33-customers/878810-user-registration-form-order-of-the-field#212199 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3  Hi all,  in the default setting of the customers registration form all fields are displayed in one column. I would like to display the street and house number in one row as well as the post code and city in one row. The related php file uses a table which is not static but will be generated related to the used fields, so there is nothing that can be changed manually by editing the table. Any clue how that could work? Or is it just a simple setting that can be edited in the custom fields section and I overlooked this?  Thanks.")*

Hi Nicolas,

basically I understand what you are saying. If it was statc HTML it would be simple to skip the td-tags for the related fields.
But in php I really have no understanding how that could work. I think there need to be made some exceptions in the code only with the fields that should be displayed different (street, house number, post code, city). But as long as the code applies to all relevant fields I have no understanding.

This is the related code of the user custom_fields file:
Code:

?&gt;&lt;?php $type = $this-&gt;type; foreach($this-&gt;extraFields[$type] as $fieldName =&gt; $oneExtraField) { ?&gt; &lt;tr class="hikashop_registration_&lt;?php echo $fieldName;?&gt;_line" id="hikashop_&lt;?php echo $type.'_'.$oneExtraField-&gt;field_namekey; ?&gt;"&gt; &lt;td class="key"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt; &lt;/td&gt; &lt;td&gt; &lt;?php $onWhat='onchange'; if($oneExtraField-&gt;field_type=='radio') $onWhat='onclick'; echo $this-&gt;fieldsClass-&gt;display( $oneExtraField, @$this-&gt;$type-&gt;$fieldName, 'data['.$type.']['.$fieldName.']', false, ' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"', false, $this-&gt;extraFields[$type], $this-&gt;$type ); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt;

Last edit: 11 years 2 months ago by [disc](/forum/user/35571-disc "View disc's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84Nzg4MTAtdXNlci1yZWdpc3RyYXRpb24tZm9ybS1vcmRlci1vZi10aGUtZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 2 months ago [\#212204](#212204) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[User registration form: Order of the field](/forum/33-customers/878810-user-registration-form-order-of-the-field#212204 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3  Hi all,  in the default setting of the customers registration form all fields are displayed in one column. I would like to display the street and house number in one row as well as the post code and city in one row. The related php file uses a table which is not static but will be generated related to the used fields, so there is nothing that can be changed manually by editing the table. Any clue how that could work? Or is it just a simple setting that can be edited in the custom fields section and I overlooked this?  Thanks.")*

Hi,

It's not complex to add specific rules for only one field.

For example if you want to add the:
&lt;tr class="hikashop_registration_&lt;?php echo $fieldName;?&gt;_line" id="hikashop_&lt;?php echo $type.'_'.$oneExtraField-&gt;field_namekey; ?&gt;"&gt;
to all the fields expect one called "test", you can do like that:
&lt;?php if ($fieldName!='test'){ ?&gt;
&lt;tr class="hikashop_registration_&lt;?php echo $fieldName;?&gt;_line" id="hikashop_&lt;?php echo $type.'_'.$oneExtraField-&gt;field_namekey; ?&gt;"&gt;
&lt;?php } ?&gt;

If you know a bit of PHP, it's fairly easy. But again, even without changing anything there, I think that you should be able to achieve such display with CSS alone.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84Nzg4MTAtdXNlci1yZWdpc3RyYXRpb24tZm9ybS1vcmRlci1vZi10aGUtZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
