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

#   Create multivariables inputs in vendor registration form

##

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

Less More

- Posts: 105
- Thank you received: 2
-
-

10 years 2 weeks ago [\#254301](#254301) by [rfonta](/forum/user/30933-rfonta "View rfonta's Profile")  *[Create multivariables inputs in vendor registration form](/forum/19-hikamarket/887285-create-multivariables-inputs-in-vendor-registration-form#254301 "-- HikaShop version -- : 2.6.0 -- HikaMarket version -- : 1.6.7  Hello, i would like to create complex inputs for a vendor . For example (see image sent): - have the possibility to add as many languages spoken by the vendor (with for each language added, a dropdown list with options coming from a database table of my own) - give a mastery score for a list of &quot;sectors&quot; for the vendor (with for each competence, several radio buttons, all coming from a database table of my own) For both of them i was able to build a complete form, loading the values, saving,....(using a $jinput function).. When I save the results, I &quot;implode&quot; some values (languages is a simple implode, so my database &quot;languages&quot; field becomes &quot;id&#95;language1,id&#95;language2,...&quot;; for the &quot;sectors&quot; i built a more complex way with the id of the competence and its score separated by a ::, so I have my database &quot;sectors&quot; field as &quot;id&#95;sector1::score1,id&#95;sector2::score2,...&quot;) I would like to integrate this type of fields/form in the vendor registration but I am stuck. I started to do the following : - I created vendor custom fields (languages, sectors,...) - I edited the &quot;registration.php&quot; view; for each of my add custom filed, I was able to show the fields exactly as in my own form,...  but I don't know how to collect the answers, &quot;implode them&quot; and save them when using the Hikamarket registration form. The key problem is that because of these necessary &quot;implodes&quot;, I need to collect the values and &quot;implode&quot; them before they are collected by the Hikamarket function getting the fields and saving them (which is/are the functions that I don't know of)  Could you tell me the how to do it?")* was created by *[rfonta](/forum/user/30933-rfonta "View rfonta's Profile")*

-- HikaShop version -- : 2.6.0
-- HikaMarket version -- : 1.6.7

Hello,
i would like to create complex inputs for a vendor . For example (see image sent):
- have the possibility to add as many languages spoken by the vendor (with for each language added, a dropdown list with options coming from a database table of my own)
- give a mastery score for a list of "sectors" for the vendor (with for each competence, several radio buttons, all coming from a database table of my own)
For both of them i was able to build a complete form, loading the values, saving,....(using a $jinput function).. When I save the results, I "implode" some values (languages is a simple implode, so my database "languages" field becomes "id_language1,id_language2,..."; for the "sectors" i built a more complex way with the id of the competence and its score separated by a ::, so I have my database "sectors" field as "id_sector1::score1,id_sector2::score2,...")
I would like to integrate this type of fields/form in the vendor registration but I am stuck.
I started to do the following :
- I created vendor custom fields (languages, sectors,...)
- I edited the "registration.php" view; for each of my add custom filed, I was able to show the fields exactly as in my own form,...

but I don't know how to collect the answers, "implode them" and save them when using the Hikamarket registration form. The key problem is that because of these necessary "implodes", I need to collect the values and "implode" them before they are collected by the Hikamarket function getting the fields and saving them (which is/are the functions that I don't know of)

Could you tell me the how to do it?

- [ ![2016-11-0221&#95;27&#95;39-Photos.png](/forum/attachment/34408) ](/forum/attachment/34408 "...&#95;39-Photos.png") [ ](/forum/attachment/34408?download=1 "...&#95;39-Photos.png")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 2 weeks ago [\#254304](#254304) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Create multivariables inputs in vendor registration form](/forum/19-hikamarket/887285-create-multivariables-inputs-in-vendor-registration-form#254304 "-- HikaShop version -- : 2.6.0 -- HikaMarket version -- : 1.6.7  Hello, i would like to create complex inputs for a vendor . For example (see image sent): - have the possibility to add as many languages spoken by the vendor (with for each language added, a dropdown list with options coming from a database table of my own) - give a mastery score for a list of &quot;sectors&quot; for the vendor (with for each competence, several radio buttons, all coming from a database table of my own) For both of them i was able to build a complete form, loading the values, saving,....(using a $jinput function).. When I save the results, I &quot;implode&quot; some values (languages is a simple implode, so my database &quot;languages&quot; field becomes &quot;id&#95;language1,id&#95;language2,...&quot;; for the &quot;sectors&quot; i built a more complex way with the id of the competence and its score separated by a ::, so I have my database &quot;sectors&quot; field as &quot;id&#95;sector1::score1,id&#95;sector2::score2,...&quot;) I would like to integrate this type of fields/form in the vendor registration but I am stuck. I started to do the following : - I created vendor custom fields (languages, sectors,...) - I edited the &quot;registration.php&quot; view; for each of my add custom filed, I was able to show the fields exactly as in my own form,...  but I don't know how to collect the answers, &quot;implode them&quot; and save them when using the Hikamarket registration form. The key problem is that because of these necessary &quot;implodes&quot;, I need to collect the values and &quot;implode&quot; them before they are collected by the Hikamarket function getting the fields and saving them (which is/are the functions that I don't know of)  Could you tell me the how to do it?")*

Hi,

In order to have the flexibility and the right interfaces everywhere (in the front-end, back-end, in vendor page, email, etc) the best is to use a custom plugin to create a new type of custom field.

The "advanced date picker" is an example of custom field provided by a plugin ; HikaMarket also provide some, like the "vendor selection" one (hikashop / market_vendorselectfield).
With the plugin you can control how the content is "display" (in edition) and how the content is "show" (vendor page, email...).
You can put a complexe structure behind the field and serialize the content into one column in your database (the column for the custom field). That process, made during the "check" can be a simple implode or a json serialization ; it's all up to you.

But the interesting point is that, once you will have you custom plugin field, it will directly work everywhere in your website without need to override a single view.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [rfonta](/forum/user/30933-rfonta "View rfonta's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODg3Mjg1LWNyZWF0ZS1tdWx0aXZhcmlhYmxlcy1pbnB1dHMtaW4tdmVuZG9yLXJlZ2lzdHJhdGlvbi1mb3JtP3RtcGw9bWFya2Rvd24=) 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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.048 seconds

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