I created an edit form to edit a custom posttype 'oproep'. I am not able to see the display options for the taxonomies. When executing the form to edit an 'oproep' I can see the selected taxonomies and a text field to add new ones.
I do not want the user to add taxonomies, I need a dropdown box or a selection box so the user can select another taxonomy or other taxonomies.
Hi,
Thank you for contacting us and I'd be happy to assist.
When the visual form builder is being used, the option to select the type of input field and the allowance of new terms, are available in the taxonomy field's settings.
( example screenshot attached )
If you're using the 'Expert mode', the shortcode for the taxonomy field, looks like this:
( ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field )
<div class="form-group">
<label for="%%FORM_ID%%_book-category">[cred_i18n name='book-category-label']Book Categories[/cred_i18n]</label>
[cred_field field='book-category' force_type='taxonomy' output='bootstrap' display='select' single_select='true']
[cred_field field="book-category_add_new" taxonomy="book-category" type="add_new"]
</div>
The 'display' attribute can be used to specify the type of input field. And the add new shortcode part ( example: [cred_field field="book-category_add_new" taxonomy="book-category" type="add_new"] ), can be removed if you don't want to allow users to enter new taxonomy terms.
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
First of all, I do not have the display options as seen in the screenshot (Why not?)
The form field on the form does not change when I alter the options as suggested:
<div class="form-group">
<label for="%%FORM_ID%%_doelgroep">[cred_i18n name='doelgroep-label']Doelgroepen[/cred_i18n]</label>
[cred_field field='doelgroep' force_type='taxonomy' output='bootstrap' display='select' single_select='true' ]
</div>
There are no changes visible on the form, and I am using the correct form id
Do you see any error or warning while viewing the form editor?
( on the screen, in the browser's console, or the server's error log )
To troubleshoot this, I'll need to see how this form is set up in the admin area. Please share the temporary admin login details, along with the form name that you're working with.
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
The access details worked, thank you.
I noticed that the 'Doelgroepen' is set as a 'Flat' type taxonomy.
( screesnhot: hidden link )
When a flat taxonomy is used, it always shows the input field as the text field, where you have the option to show or hide existing taxonomy terms to choose from.
Example:
<div class="form-group">
<label for="%%FORM_ID%%_book-category">[cred_i18n name='book-category-label']Book Categories[/cred_i18n]</label>
[cred_field field='book-category' force_type='taxonomy' output='bootstrap' class='form-control']
[cred_field field="book-category_popular" taxonomy="book-category" type="show_popular"]
</div>
If you'd prefer a select/dropdown type field for this taxonomy, you'll need to change the type of this taxonomy to 'Hierarchical'.
As for the visual options for the form fields, they are not showing because your form is set to use the 'Expert mode'.
( screenshot: hidden link )
When the expert mode is on, the visual drag-and-drop form builder is replaced with a classic editor, where you have full control over the HTML and shortcodes for the form fields.
I changed all taxonomies to Hierarchical and it works now. Thanks!