Custom fields restrictions problem

  • Posts: 104
  • Thank you received: 5
9 months 2 weeks ago #354830

-- HikaShop version -- : 4.7.1

Hi
I created a custom address field and I want to restrict its display to the State field, but instead of displaying a list of Iran states, it displays the country name.


Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81853
  • Thank you received: 13143
  • MODERATOR
9 months 2 weeks ago #354832

Hi,

There is no "location" type custom field in HikaShop.
This is apparently a type specific to JB Location so I'm not sure what it is supposed to display.
I would recomend using instead a "single dropdown" field with the different states as values of the field.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 5
9 months 2 weeks ago #354847

I have added the location type field using a dedicated plugin. Any other type of field that you create in Hikashop and you want to restrict its display to States, will not display the list of States.
In the image below, I have used a custom field that already exists in Hikashop and the problem still persists.:

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81853
  • Thank you received: 13143
  • MODERATOR
9 months 2 weeks ago #354848

Hi,

Any other type of field that you create in Hikashop and you want to restrict its display to States, will not display the list of States.

I don't understand what you mean.
The custom field on your screenshot is a text input field. It will display an input. It's normal it doesn't display a list of states.
If you want a list of states, you need to use the "address_state" custom field. In fact, it's already preconfigured to display a list of states automatically. Check on our website, you can already select the state of the country you select in the "address_country" field.

If your issue is that you disabled the "address_country" field, and you're wondering how to change the list of states to another country than the current one, the answer is that you need to edit the address_country field, and you need to change it's default country. Select Iran and the address_state field will automatically display a list of the Iran states.

The "display limited to" setting allows you to display or not the current custom field based on what is selected by the user in another field. It won't affect how the field looks like.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 5
9 months 2 weeks ago #354874

You don't seem to understand what I mean, so I'll explain the problem from the beginning:
I want to display a text field depending on the user selecting a specific state from the list.
The problem is that when I want to limit the display of this field to (for example, the state of Tehran), it does not display the list of states at all, so I cannot select Tehran.
Currently, the custom field that shows the states of Iran is active and there is no problem in the user section. The problem is in the restriction of custom fields that do not show the states of Iran. It displays the country name instead.
Why does the states field display the country name in the restrictions section instead of a list of states?

Please Log in or Create an account to join the conversation.

  • Posts: 81853
  • Thank you received: 13143
  • MODERATOR
9 months 1 week ago #354905

Ah ok. I see what you mean.
What you need to do is to select a different country. Then, select again the Iran country and you'll see the dropdown to select the states below the dropdown to select the country:
i.imgur.com/ikkatxA.png

Last edit: 9 months 1 week ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 5
9 months 1 week ago #354978

I did this, but the display of the field was not limited to the desired state.
It is also not possible to limit the field display to multiple states.

Please Log in or Create an account to join the conversation.

  • Posts: 81853
  • Thank you received: 13143
  • MODERATOR
9 months 1 week ago #354980

Hi,

You're right, the system of "display limited to" doesn't support "zone" fields.
It would actually be quite complex to support that.

Could you explain what you're trying to do with this ? Maybe we can provide a simpler solution.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 5
9 months 1 week ago #354985

I want to limit the display of a custom field to a specific state. For example, I want a field to be displayed to the user only if he has selected the state of Tehran.

Please Log in or Create an account to join the conversation.

  • Posts: 81853
  • Thank you received: 13143
  • MODERATOR
9 months 1 week ago #354998

Hi,

I understand this. But why ? What information are you trying to gather ? Does that information changes for each order ? Is that information specific to the shipping address and related to how the post office works in Iran ? Why do you need to limit it to only some states ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum