Problem: I have created a Content Template for a custom post type. I am displaying some content inside a custom HTML block. Inside that block, I would like to conditionally display some content if a specific custom field is not empty.
Solution: You can use the wpv-conditional shortcode inside a custom HTML block to add conditional logic for displaying or hiding portions of the content. For example:
[wpv-conditional if="($(wpcf-consignee-company-name) ne '' )"]
<span class="invoice-to-label">Company: [types field='consignee-company-name'][/types]</span><br>
[/wpv-conditional]
The problem here is that the user is creating their custom fields but wanted to convert one field type to another and noticed that some field types cant be converted to another type.
Solution:
This has to do with how the fields are formatted by our plugins in the database. What this means is that some custom fields you won't be able to convert from a simple field to a more complex custom field, example move from a single link to a WYSIWYG field.
Similarly with checkboxes, you won't be able to move from a single line to a checkbox field. Hence why some fields are not allowed to be converted to another field type.