Tell us what you are trying to do?
I want to create one custom form to add multiple products types. Depending on the selected product type (available as a dropdown list in the form), extra product data fields should appear. I got it to work, using a workaround:
- I needed to use "expert mode", because the dropdown (taxonomy) field is not listed in the GUI for building the conditional block. Also, if the fields are added inside the conditional block using the visual editor before switching to "expert mode", all elements inside the block are not visible in the "expert editor". So I added all elements in "GUI mode" but without moving the fields into the conditional block, then switched to "expert mode" and made all modifications and copy / paste
- the "if" condition needs to get the numerical "value" data for the option which is chosen from the dropdown, it cannot use the text. The only way to know the value is to go into "debugging mode" and look at the HTML to find the corresponding "value" data for the dropdown list options
[cred_show_group if="( $(producttype) eq 27 )" mode="fade-slide"] ... [/cred_show_group]
- options of the dropdown list appears in alphabetical order. In the taxonomy I created a "ranking" datafield to create an "order by" statement
-> it would be nice be able to use a custom query to populate the dropdown list to address all of the above remarks. Is it possible to tweak following code:
[cred_field field='producttype' force_type='taxonomy' output='bootstrap' display='select' single_select='true']
Is there any documentation that you are following?
- https://toolset.com/learn/create-an-ecommerce-wordpress-site/how-to-create-a-front-end-form-for-adding-woocommerce-products/
Is there a similar example that we can see?
- no
What is the link to your site?
- not available yet
thanks,
Ken