Change Dropdown field to multiselect field according to Category

Hello everyone,

I have a "Type" field as  dropdown and I want to change it multiselect field according to Category change. Please share your idea that how can I do it.

If category = specimen then Type field = multiselect.

If category = product then Type  field = dropdown.

Thanks

Laxmichand saini

Parents
  • Hello ,

    I don't think that it's safe to change the field type because the data consistency will be wrong in database.

    So, in my mind, you need

    • a dropdown field, visible if category = specimen
    • a multiselect field, visible if category = product
    • both fields used the same dropdown list
    • a "consolidated" multiselect field where the value is stored (using hook for instance) : so only one value if specimen, possibly many if product
      • this field will be used for reporting etc.

    best regards,

    Fred

Reply
  • Hello ,

    I don't think that it's safe to change the field type because the data consistency will be wrong in database.

    So, in my mind, you need

    • a dropdown field, visible if category = specimen
    • a multiselect field, visible if category = product
    • both fields used the same dropdown list
    • a "consolidated" multiselect field where the value is stored (using hook for instance) : so only one value if specimen, possibly many if product
      • this field will be used for reporting etc.

    best regards,

    Fred

Children