Home › Forums › ACF PRO › check if block instance already exists › Reply To: check if block instance already exists
Hey @julescolle – if I am heading down the right path for you, you merely want to set default values for fields (if no value is entered yet)?
One way is that you can set default values right from the get_field() without any conditional logic snippets.
$example = get_field( 'cpar_example' ) ?: 'use this value if not entered';
This would then display block preview with those default values when first added to the editor and/or preview. Then when entering a value into the fields, it would override.
Hope this helps…
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.