Hi,
I've created wysiwyg custom field "ovanova-text" and added a default value that includes shortcode like so:
<p>Support [types field='partner-organization'][/types] and learn what solar can do for you by sharing your contact information and choosing the most convenient time to connect with you.</p>.
However, the shortcode is being stripped out. How can we fix this?
Hi Laurence,
Thank you for waiting.
The "cred_field" shortcode, supports a "value" attribute for setting a default value.
( ref: https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field )
You can use that in your field for the editing form, like this:
[cred_field field="ovanova-text" force_type="field" class="form-control" output="bootstrap" value="Support [types field='partner-organization'][/types] and learn what solar can do for you by sharing your contact information and choosing the most convenient time to connect with you."]
For a new post form, it won't be useful to use a default value which is dependant on the value of another custom field, because it would be empty.
>> If I remove the field from the add new post form, then the
>> custom fields keeps the default value in the backend correctly.
>> If I remove the field from the edit post form, it stays correctly in
>> the backend but doesn't display on the frontend.
- When the WYSIWYG field with a default value exists in the form and it is submitted, that value is saved/stored as a fixed value and no longer remains a default value.
To avoid this, it would be better to show this default text on the top or bottom of the WYSIWYG custom field and not inside it.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
My issue is resolved now. Thank you!
Problem was a colleague changed custom field slug. I scrapped the custom field and added the default text to the Elementor page template.