• Resolved Pacho Gzz

    (@bigpacho)


    Hi!,

    Thanks for taking the time to read my question/support question; it may be something really simple but I still can’t find the way to do it.

    I have the select Icon field + image field, so you can choose to updload or select an icon, depending of the need; altho I know I can simply hide one option if the other is active, I still require to have the chance to deselect any icon value that the selector has so, when it saved, only the image or even NONE get saved.

    How to do this? I hope to have explained good enough myself.

    Thank you in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Keys

    (@mattkeys)

    Personally I wouldn’t rely on an editor to unselect an icon in the admin area if they want to use an image instead.

    I would have a button group, or select, or radio field (whichever makes sense to you) that has the options available to your editor, such as:

    Image
    FontAwesome Icon

    I would then conditionally show the correct field (image or icon) in the admin area depending on their selection.

    And finally in your template before displaying the image or icon value, you should first check which field they chose (image or icon) and only display that value.

    With all of that said, this plugin also does have an option to allow an empty icon field. When you create your icon field in ACF look for the ‘Allow Null?’ option. If it is True, there will be a little ‘x’ on the icon field allowing you to unselect any selected value.

    Thread Starter Pacho Gzz

    (@bigpacho)

    Hello!

    What a lovely and awesome response!
    I really appreciate you take the time to check on this, I will put hands on todo this “Enable/Disable” feature.
    And thanks for letting me know the “null” option I woudln’t think on that before.

    Thanks again!


    Pacho G.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.