Skip Navigation

[Resolved] CRED form taxonomy field – delete option only

This thread is resolved. Here is a description of the problem and solution.

Problem:

Disable add new term inputs in taxonomy field of Toolset post form.

Solution:

You can use CSS codes to hide them, for example:

https://toolset.com/forums/topic/cred-form-taxonomy-field-delete-option-only/#post-1271361

Relevant Documentation:

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by martinE-4 5 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1271319
Datastan_Meets_Storyland__Surfing_the_Zeitgeist_Without_Wiping_Out_–_ICASC_MIgration_1.jpg

Hi Christian - Sorry to have another question about my form. (It's coming along quite nicely thanks to you!)

I'm trying to add the feature of selectively removing related resources (the taxonomy values) using the CRED taxonomy input field. Of course it's not quite what I want because it offers input when actually I only want to allow the user to optionally delete taxonomy values. (see uploaded image)

Any ideas? (maybe a delete button below each related resource in the view at the bottom?)

form code:

[credform]
<em>Add a related resource by selecting it from the dropdown menu. Then press 'Submit'</em>	
  <table class="table  table-borderless">
   <tr>
    <td>
[types field='resource_thumbnail_image' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail' resize='proportional'][/types]      
     </td>
     <td ><h2>[wpv-post-link]</h2></td> 
  </tr>
  </table>

<div class="form-group">
	<label>Choose a related resource</label>
	[cred_generic_field type='select' field='related-resource' class="" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[ [wpv-view  name="all-resources"] ]
}
[/cred_generic_field]
  [cred_field field='related' force_type='taxonomy' output='bootstrap' class='form-control']

	</div>
[wpv-conditional if="('[wpv-post-taxonomy type='related' format='slug' ]' ne '' )"]
[wpv-view name="related-resources-by-taxonomy" view_display="layout" limit="8" wpvrelated="[wpv-post-taxonomy type="related" format="name"]" ]
[/wpv-conditional]
<b>Related Resources:</b><br>[wpv-view name="related-results-with-grid"]
	[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/credform]
#1271361

Hello,

I assume we are talking about a Toolset form for editing post and the taxonomy field in codes you mentioned above:

[cred_field field='related' force_type='taxonomy' output='bootstrap' class='form-control']

If it is, see our document, there isn't such a feature to disable add new term feature:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

But you can use CSS codes to hide them, for example:

input[name="tmp_related"], input[name="new_tax_button_related"]{
display:none;
}
#1271879

My issue is resolved now. Thank you!

I didn't realize you could put 'code' in the CSS area! Fantastic!