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

#   Unhide custom field after updating in view

##

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago -  13 years 7 months ago [\#93537](#93537) by [Devine](/forum/user/2915-devine "View Devine's Profile")  *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#93537 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")* was created by *[Devine](/forum/user/2915-devine "View Devine's Profile")*

I have two Order custom fields.

- Do you have a serial number? Yes/No
- Serial Number

Serial number is set with Display limited to Do you have a serial number? = Yes.

This is all working fine but I have recently edited the custom_fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.

Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.

Last edit: 13 years 7 months ago by [Devine](/forum/user/2915-devine "View Devine's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#93588](#93588) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#93588 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

If there is an existing value for the coupon, you have to change the first custom field value to yes.
Are you using, radio button ? Could you give us a link to that page, and a test account ?

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago [\#93816](#93816) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#93816 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Yeah sure, I didn't actually have this on the live site yet but I have now partially added the feature so we can test it.

[ www.calxa.com.au/index.php?Itemid=69&amp;opt...=product&amp;layout=show](https://www.calxa.com.au/index.php?Itemid=69&option=com_hikashop&view=product&layout=show)

Add any product to the cart then login as:
Username: hika
Password: hika

The second step in the checkout is titled Serial Number. You will note there are two front end visible fields labeled;
Do you have a serial number?
Serial Number

The 'Serial Number' fields is configured to display only when 'Do you have a serial number?' = 'Yes'

Using the hika user these fields will be populated with Yes and ThisIsASerialNumber, however the second field is not shown until you click on Yes.

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#93875](#93875) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#93875 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

In the view "checkout / step", at the end of the file try to add the javascript:
Code:

var serialNumber = document.getElementById('hikashop_order_order_serial_number'); if(serialNumber.value != '') serialNumber.style.display = 'inherit';

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago [\#93995](#93995) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#93995 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

I have added the script but it has not changed. I also temporarily added window.alert(serialNumber.value); which returned undefined.

Is there something wrong with the syntax for serialNumber.value to return undefined?

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago [\#94045](#94045) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#94045 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Further to my other question regards the display of a single field, I have now also made customisations to the "checkout\fields" view. The purpose of this change is to not display the "custom_fields" at all if they are not required. Instead I am just displaying some text explaining that new serial numbers must be issued.

This is causing a problem though because I can't proceed to the next step. A message is displayed saying:

*Please fill the Do you have an existing Calxa serial number? field.*

I don't understand why this is when a default value of "no" should be set. If I output the value of $this-&gt;order-&gt;order_existing_serial it says "no", yet the error message suggests it is not populated.

If you would like to reproduce this to see it in action you will need to add two different but not including Monthly Subscription products to the cart. You should then get the scenario where the custom order fields are not displayed.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MDg1LXVuaGlkZS1jdXN0b20tZmllbGQtYWZ0ZXItdXBkYXRpbmctaW4tdmlldz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

13 years 7 months ago [\#94457](#94457) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#94457 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

The code of xavier won't work.

The js variable serialNumber doesn't have the input field value in it.
It should actually be: Code:

var serialNumberDiv = document.getElementById('hikashop_order_order_serial_number'); var serialNumber = document.getElementById('order_serial_number'); if(serialNumber.value != '') serialNumberDiv.style.display = 'block';

If the field is required, you can't remove its HTML. The system is done so that even if the user try to cheat by removing the HTML on the page, it won't allow the user to continue. Xavier mthod of hidding the HTML instead in CSS will allow you to reach the same function without the issue with the require check since the fields will actually still be processed.

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago [\#94475](#94475) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#94475 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

One step closer but still not quite there. It is at least recognising the serial number value now, however the style.display = 'block' does not seem to change anything. I have updated the script on the live site so you can check it out.

As a test I also removed the option to limit the display of this field. Then is I changed the 'block' to 'none' and I could see the changes reflected, so we no the script is now being correctly called. Having said this the field is still not shown when you first display the custom fields (Serial Number) step. My thoughts are that this script is being called too early and then the limit display option comes in after this one and hides it again. What script handles the conditional display of that field normally?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MDg1LXVuaGlkZS1jdXN0b20tZmllbGQtYWZ0ZXItdXBkYXRpbmctaW4tdmlldz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

13 years 7 months ago [\#94591](#94591) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#94591 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

The id was the id of the input field, not the one of the radio of the first field. Try with that code instead:

var serialNumberDiv = document.getElementById('hikashop_order_order_serial_number');
var serialNumber = document.getElementById('order_existing_serial_yes');
if(serialNumber.checked) serialNumberDiv.style.display = 'block';

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago [\#94643](#94643) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#94643 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Sorry ![:(](/media/kunena/emoticons/22.png ":(") Still no luck with the new script.

Do you need some more information?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MDg1LXVuaGlkZS1jdXN0b20tZmllbGQtYWZ0ZXItdXBkYXRpbmctaW4tdmlldz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

13 years 7 months ago [\#95109](#95109) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#95109 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Can you try with that code so that the JS is only run after the page is loaded:

window.addEvent('domready', function(){
var serialNumberDiv = document.getElementById('hikashop_order_order_serial_number');
var serialNumber = document.getElementById('order_existing_serial_yes');
if(serialNumber.checked) serialNumberDiv.style.display = 'block';
});

The following user(s) said Thank You: [Devine](/forum/user/2915-devine "View Devine's Profile")

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago [\#95176](#95176) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#95176 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Thank you much appreciated, this has now worked. ![:)](/media/kunena/emoticons/3.png ":)")

However as we got tied up in this problem we have left another question problem alone. I let it go because I figured it would be easier to focus on one at a time.

Anyway here is the details of my other problem. I have now also made customisations to the "checkout\fields" view. The purpose of this change is to not display the "custom_fields" at all if they are not required. Instead I am just displaying some text explaining that new serial numbers must be issued.

This is causing a problem though because I can't proceed to the next step. A message is displayed saying:

Please fill the Do you have an existing Calxa serial number? field.

I don't understand why this is when a default value of "no" should be set. If I output the value of $this-&gt;order-&gt;order_existing_serial it says "no", yet the error message suggests it is not populated.

If you would like to reproduce this to see it in action you will need to add two different but not including Monthly Subscription products to the cart. You should then get the scenario where the custom order fields are not displayed.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MDg1LXVuaGlkZS1jdXN0b20tZmllbGQtYWZ0ZXItdXBkYXRpbmctaW4tdmlldz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

13 years 7 months ago [\#95273](#95273) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#95273 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

I'm guessing that the problem comes from your customization.

Please give a link to the two product pages to add to the cart to reproduce the problem and explain the modification that you did.

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 7 months ago -  13 years 7 months ago [\#95385](#95385) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#95385 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

[ www.calxa.com.au/index.php?option=com\_hi...ayout=show&amp;Itemid=69](http://www.calxa.com.au/index.php?option=com_hikashop&view=product&layout=show&Itemid=69)

On this page add the Calxa Premier 1 Year Subscription and the Calxa Premier 3 Year Subscription. Now login and proceed to the Serial Number step. If you click next on this step it returns the message saying *Please fill the Do you have an existing Calxa serial number? field*.

Here is the custom view checkout / fields.php
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.0.0 * @author hikashop.com * @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt; &lt;?php $multipleProducts = false; $cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadFullCart(true); if(count($cart-&gt;products) &gt; 1) { $multipleProducts = true; } if(hikashop_level(2) &amp;&amp; !empty($this-&gt;extraFields['order']) &amp;&amp; !$multipleProducts){ ?&gt; &lt;div id="hikashop_checkout_additional_info" class="hikashop_checkout_additional_info"&gt; &lt;fieldset class="input"&gt; &lt;legend&gt;&lt;?php echo JText::_('ADDITIONAL_INFORMATION');?&gt;&lt;/legend&gt; &lt;table cellpadding="0" cellspacing="0" border="0" class="hikashop_contentpane"&gt; &lt;?php if(!empty($this-&gt;extraFields['order'])){ JRequest::setVar('hikashop_check_order',1); $this-&gt;setLayout('custom_fields'); $this-&gt;type = 'order'; echo $this-&gt;loadTemplate(); } ?&gt; &lt;/table&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;div style="clear:both"&gt;&lt;/div&gt; &lt;?php } else {?&gt; &lt;div id="hikashop_checkout_additional_info" class="hikashop_checkout_additional_info"&gt; &lt;p&gt;You may not use an existing serial number to purchase multiple products. &lt;br /&gt;&lt;strong&gt;Press Next to continue and issue new serial numbers.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Otherwise remove a product from the cart and you may renew your Calxa product with an existing serial number.&lt;/p&gt; &lt;?php } ?&gt;

Last edit: 13 years 7 months ago by [Devine](/forum/user/2915-devine "View Devine's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MDg1LXVuaGlkZS1jdXN0b20tZmllbGQtYWZ0ZXItdXBkYXRpbmctaW4tdmlldz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

13 years 7 months ago [\#95658](#95658) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#95658 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Hi,

Your code is not correct.
You should add hidden input fields to replace the custom fields that you don't display in your else block of code. Code:

&lt;input type="hidden" name="data[order][order_existing_serial]" value="no" id="order_existing_serial_no" checked="checked" /&gt; &lt;input class="hidden" id="order_serial_number" size="50" maxlength="50" type="text" name="data[order][order_serial_number]" value="ThisIsASerialNumber" /&gt;

The following user(s) said Thank You: [Devine](/forum/user/2915-devine "View Devine's Profile")

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

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

Less More

- Posts: 62
- Thank you received: 0
-
-

13 years 3 months ago [\#116339](#116339) by [Devine](/forum/user/2915-devine "View Devine's Profile")  Replied by *[Devine](/forum/user/2915-devine "View Devine's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#116339 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Hello,

As described in previous posts I have my fields step as a separate step in the checkout (login_address_shipping_coupon,fields,payment_terms_confirm_cart_status,end). My problem is that you need to click Next twice to proceed to the next step. I assume this has always been an issue since I made the above customisations but I have only just noticed it. Perhaps it is only an issue because the Fields step is on it's own but I do require this to be a separate step.

If you do click past this step to the payment step and then go back you no longer require to click next twice, so I assume the fields are not being marked as OK early enough to proceed the first time.

Can you please assist me with this as I would like the user to be able to fill out the fields and then proceed without having to click next twice?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MDg1LXVuaGlkZS1jdXN0b20tZmllbGQtYWZ0ZXItdXBkYXRpbmctaW4tdmlldz90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

13 years 3 months ago [\#116484](#116484) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Unhide custom field after updating in view](/forum/2-general-talk-about-hikashop/79085-unhide-custom-field-after-updating-in-view#116484 "I have two Order custom fields.  &#42; Do you have a serial number? Yes/No  &#42; Serial Number  Serial number is set with Display limited to Do you have a serial number? = Yes.  This is all working fine but I have recently edited the custom&#95;fields view. This now checks for and populates these fields if an existing serial number is available based on the logged in user. This is all working but for some reason the Serial Number field is still hidden unless I click on the Yes toggle, even though it is already active on yes. Also when you click yes the serial number is populated so the values are being updated bu the display is not until I click on Yes.  Any ideas on what I might be doing wrong? I would like to display the serial number field if I update the fields in the view.")*

Hi,

I have no idea. I remember such bug in previous versions of HikaShop but we don't have the problem with the latest version on our end and I don't see why the modifications of this thread would change that.
Did you try on a copy of your website with the latest version of HikaShop ? If it still doesn't work, does it work if you remove your changes ?

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

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