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

#   the custom field for inquiry form failed to submmit

##

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

Less More

- Posts: 42
- Thank you received: 0
-
-

3 years 9 months ago [\#348149](#348149) by [cycnorman](/forum/user/47369-cycnorman "View cycnorman's Profile")  *[the custom field for inquiry form failed to submmit](/forum/27-checkout/905675-the-custom-field-for-inquiry-form-failed-to-submmit#348149 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : no error message on the page.  Hello I have installed hikashop business on a client's website for many years and It has been working well from the begining.  but recently my client found that when sending inquiry after submitting the form, there is a message &quot;ERROR please complete the model field', and another message &quot;please enter a valid email address&quot;.  The model field is configured by custom field for customers to know what machine model they inquiry, that is alway work well and the email field I filled is correctly match the email form such like  I do not know why it shows the error message.  You can test it on my website and you can know what I said.  Please hlep me to solve this issue, thank you.")* was created by *[cycnorman](/forum/user/47369-cycnorman "View cycnorman's Profile")*

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6.40
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : no error message on the page.

Hello
I have installed hikashop business on a client's website for many years and It has been working well from the begining.

but recently my client found that when sending inquiry after submitting the form, there is a message "ERROR please complete the model field', and another message "please enter a valid email address".

The model field is configured by custom field for customers to know what machine model they inquiry, that is alway work well and the email field I filled is correctly match the email form such like "service_test@gmail.com".

I do not know why it shows the error message.

You can test it on my website and you can know what I said.
[ ![hikashop.jpg](/forum/attachment/56287) ](/forum/attachment/56287 "hikashop.jpg")

Please hlep me to solve this issue, thank you.

- [ ![hikashop.jpg](/forum/attachment/56287) ](/forum/attachment/56287 "hikashop.jpg") [ ](/forum/attachment/56287?download=1 "hikashop.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNTY3NS10aGUtY3VzdG9tLWZpZWxkLWZvci1pbnF1aXJ5LWZvcm0tZmFpbGVkLXRvLXN1Ym1taXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

3 years 9 months ago [\#348157](#348157) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[the custom field for inquiry form failed to submmit](/forum/27-checkout/905675-the-custom-field-for-inquiry-form-failed-to-submmit#348157 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : no error message on the page.  Hello I have installed hikashop business on a client's website for many years and It has been working well from the begining.  but recently my client found that when sending inquiry after submitting the form, there is a message &quot;ERROR please complete the model field', and another message &quot;please enter a valid email address&quot;.  The model field is configured by custom field for customers to know what machine model they inquiry, that is alway work well and the email field I filled is correctly match the email form such like  I do not know why it shows the error message.  You can test it on my website and you can know what I said.  Please hlep me to solve this issue, thank you.")*

Hi,

The "please enter a valid email address" is I think a byproduct of the model field outputting an error message. When at least a field is not provided properly, the data returned will be empty in the code, resulting in the email address not being found. We'll add a check so that it doesn't output an error message for the email in such cases.

So I think the only issue is with the Model custom field. Could you provide a screenshot of the settings of the Model custom field ?
I think you might have an issue with how you configured it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNTY3NS10aGUtY3VzdG9tLWZpZWxkLWZvci1pbnF1aXJ5LWZvcm0tZmFpbGVkLXRvLXN1Ym1taXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 42
- Thank you received: 0
-
-

3 years 9 months ago -  3 years 9 months ago [\#348158](#348158) by [cycnorman](/forum/user/47369-cycnorman "View cycnorman's Profile")  Replied by *[cycnorman](/forum/user/47369-cycnorman "View cycnorman's Profile")* on topic *[the custom field for inquiry form failed to submmit](/forum/27-checkout/905675-the-custom-field-for-inquiry-form-failed-to-submmit#348158 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : no error message on the page.  Hello I have installed hikashop business on a client's website for many years and It has been working well from the begining.  but recently my client found that when sending inquiry after submitting the form, there is a message &quot;ERROR please complete the model field', and another message &quot;please enter a valid email address&quot;.  The model field is configured by custom field for customers to know what machine model they inquiry, that is alway work well and the email field I filled is correctly match the email form such like  I do not know why it shows the error message.  You can test it on my website and you can know what I said.  Please hlep me to solve this issue, thank you.")*

OK, I will provide.

I create field called "Model" for every products, for example "TINY-28".
[ ![cf1.JPG](/forum/attachment/56290) ](/forum/attachment/56290 "cf1.JPG")

I use this field for contact table and give it a default value "TINY-28".
the attachment cf2 1
[ ![cf2.JPG](/forum/attachment/56291) ](/forum/attachment/56291 "cf2.JPG")

for frontend to display the product name matching the product for inquiry.
the attachment cf2 2
[ ![cf2.JPG](/forum/attachment/56291) ](/forum/attachment/56291 "cf2.JPG")

this field is specified for exactly TINY-28 the product.
the attachment cf2 3
[ ![cf2.JPG](/forum/attachment/56291) ](/forum/attachment/56291 "cf2.JPG")

In the begining, I have used such method for many years, I do not know how it become un-functionable.

- [ ![cf1.JPG](/forum/attachment/56290) ](/forum/attachment/56290 "cf1.JPG") [ ](/forum/attachment/56290?download=1 "cf1.JPG")
- [ ![cf2.JPG](/forum/attachment/56291) ](/forum/attachment/56291 "cf2.JPG") [ ](/forum/attachment/56291?download=1 "cf2.JPG")

Last edit: 3 years 9 months ago by [cycnorman](/forum/user/47369-cycnorman "View cycnorman's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNTY3NS10aGUtY3VzdG9tLWZpZWxkLWZvci1pbnF1aXJ5LWZvcm0tZmFpbGVkLXRvLXN1Ym1taXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

3 years 9 months ago [\#348160](#348160) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[the custom field for inquiry form failed to submmit](/forum/27-checkout/905675-the-custom-field-for-inquiry-form-failed-to-submmit#348160 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.4 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : no error message on the page.  Hello I have installed hikashop business on a client's website for many years and It has been working well from the begining.  but recently my client found that when sending inquiry after submitting the form, there is a message &quot;ERROR please complete the model field', and another message &quot;please enter a valid email address&quot;.  The model field is configured by custom field for customers to know what machine model they inquiry, that is alway work well and the email field I filled is correctly match the email form such like  I do not know why it shows the error message.  You can test it on my website and you can know what I said.  Please hlep me to solve this issue, thank you.")*

Hi,

I suppose you must have activated the "required" setting of the Model custom fields and that's what lead to the issue.
I checked the code and I think it doesn't handle the product restriction properly for custom contact fields on the submission of the form when the field is required.

Changing the code: Code:

if(empty($formData['contact'])) { $formData['contact'] = @$formData['register']; foreach($formData['contact'] as $column =&gt; $value) { hikashop_secureField($column); $element-&gt;$column = strip_tags($value); } } else { $fieldsClass = hikashop_get('class.field'); $element = $fieldsClass-&gt;getInput('contact', $element); }

to: Code:

if(empty($formData['contact'])) { $formData['contact'] = @$formData['register']; } if(!empty($formData['contact'])) { foreach($formData['contact'] as $column =&gt; $value) { hikashop_secureField($column); $element-&gt;$column = strip_tags($value); } } if(empty($formData['register'])) { $fieldsClass = hikashop_get('class.field'); $element = $fieldsClass-&gt;getInput('contact', $element); }

in the file components/com_hikashop/controllers/product.php and it should help properly handle this case.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNTY3NS10aGUtY3VzdG9tLWZpZWxkLWZvci1pbnF1aXJ5LWZvcm0tZmFpbGVkLXRvLXN1Ym1taXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.060 seconds

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