Skip Navigation

[Resolved] Populate a preset vale for Category/Taxonomy for front end submission form

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

Problem:

Populate a preset vale for Category/Taxonomy field for front end submission Toolset form.

Solution:

You can setup some custom JS codes to populate the default value, for example:

https://toolset.com/forums/topic/populate-a-preset-vale-for-category-taxonomy-for-front-end-submission-form/#post-1234008

Relevant Documentation:

This support ticket is created 5 years 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 Jeffrey 5 years ago.

Assisted by: Luo Yang.

Author
Posts
#1234008

I am trying to put several forms to a miscellanies type so that I don't need to create too many post types and just categorize them with taxonomies, I guess I can populate a particular value instead of taxonomy select boxes or dropdowns in the front-end, so, when a user submits a form, the post will be automatically archived according to the populate vale, I just use css hide the taxonomy selector in the front end. how can I populate it based the shortcode below? Thank you!

[cred_field field='teaching-cate' force_type='taxonomy' output='bootstrap' display='checkbox']
      [cred_field field="teaching-cate_add_new" taxonomy="teaching-cate" type="add_new"]
#1234131

Hello,

You can setup some custom JS codes to populate the default value, for example:

jQuery(document).on('cred_form_ready', function(){
	jQuery('input[value="123"]').attr('checked', 'checked');
});

Please replace 123 with the specific term's ID. and test again

#1236171

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.