• Resolved usergimii

    (@usergimii)


    It would be great to hide the entire block if the field value is empty. I added prefix like Car Model: but when the field is empty, I still see Car Model. Ideally, when the field value is empty, the entire block should be empty.

    In future, it could be enhanced to have a custom message if the field is empty.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Phi Phan

    (@mr2p)

    Hi @usergimii,

    Thank you for your feedback. I’ll add a setting for the custom message when the value is empty in the next version.

    Phi.

    Thread Starter usergimii

    (@usergimii)

    @mr2p thank you. Can you also include the option to hide the entire block if the field value is empty? that would be great.

    Plugin Author Phi Phan

    (@mr2p)

    @usergimii Sure, I’ll add it as well.

    Phi.

    Thread Starter usergimii

    (@usergimii)

    @mr2p do you have a date for the next version release?

    Plugin Author Phi Phan

    (@mr2p)

    @usergimii I plan to release it in the next week. That feature will be there for free. I’ve been developing a big release with many features like:

    • Display term meta fields
    • Display user meta fields
    • Display setting fields
    • Display meta fields from any post/term/user items
    • Display layout fields for ACF like group repeater flexible_content with a built-in carousel, grid layout, etc.
    • Display relationship, post_object ACF fields as a custom Query Loop

    If I finish the pro version later next week, I will delay the next release of the free version until later next week, otherwise, I’ll release the next version of the free version earlier next week.

    Thanks, Phi.

    • This reply was modified 1 year, 8 months ago by Phi Phan.
    Thread Starter usergimii

    (@usergimii)

    Thank you @mr2p

    I am kind of disappointed to hear this plugin is going pro, to add additional features.

    Plugin Author Phi Phan

    (@mr2p)

    @usergimii All the core features are always free, anyone can use the hooks this plugin provided to display any kind of meta fields. The Pro version is only for advanced features, mostly for ACF users. With the pro version, they even don’t have to write custom code using the ACF Block API. And I’ll still add more free features based on user requests.

    Phi.

    Plugin Author Phi Phan

    (@mr2p)

    Hi @usergimii, I’ve added two more settings: hideEmpty and emptyMessage. Please get them in the latest version 1.1.11. Thank you very much for your suggestion on this.

    Thanks, Phi.

    Thread Starter usergimii

    (@usergimii)

    @mr2p thank you, I will test it tonight

    Is it possible to change the placeholder text for emptyMessage?

    Plugin Author Phi Phan

    (@mr2p)

    Hi @fabbaf, What do you mean by “change the placeholder text”? Could you please explain more details?

    Phi.

    If I activate “Hide block if the value is empty” in the block settings, in the block itself it says “If the value is empty, this block will be hidden in the front end.”

    I want to change this placeholder/info text: “If the value is empty, this block will be hidden in the front end.”

    • This reply was modified 1 year, 8 months ago by fabbaf.
    Plugin Author Phi Phan

    (@mr2p)

    @fabbaf If you want to change it to your language, you can translate this plugin into your language. If you want to change it in the English language, there is no setting to change it right now. But I’ll add settings for those custom messages in the future version. If you don’t mind, could you please tell me the value you want to change that text to?

    Thank you for your suggestion.

    Okay, got it.

    I want to change it to something like the default Gutenberg Post Block are using right now. For example if you use the “Post Title”-Block and you didn’t put a title in yet, it just says “No title”.

    Plugin Author Phi Phan

    (@mr2p)

    @fabbaf Thank you for sharing your idea. For some contexts like using the block in the site editor, right now there is no way to know if the value of the block is empty or not, so I choose that text to emphasize the “hide block if empty” setting. But I’ll add settings for all messages in the future version.

    Thanks, Phi.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Hide Prefix or Suffix if the field is empty’ is closed to new replies.