I need to limit the characters on the custom post type form. The first field (Describe in a few words what you received.) is the custom post type title. It uses the WordPress title for a custom post type named submissions.
The field I need to limit input length on is the 3rd field (If you'd like to, you can share a little more about your experience.)
It uses a multiple lines field.
hidden link
Can you also point me to some documentation as to whether Toolset is deleting EXIF data from uploaded images? I would like it to do so.
Thank you so much for your help!
Kelly
Hello,
There isn't such kind of built-in feature within Toolset Forms plugin, it is possible with a custom JS codes, for example, edit the post form you mentioned above, in section "JS editor", add below JS codes:
jQuery(document).on('cred_form_ready', function() {
jQuery("textarea[name='wpcf-new-submission-story']").attr("maxlength", 10);
});
More help:
hidden link
Thank you that code works for the third field on the form.
I also need something for the first field which is the post_title.
The first field (Describe in a few words what you received.) is the custom post type title. It uses the WordPress title for a custom post type named submissions.
I tried:
jQuery(document).on('cred_form_ready', function() {
jQuery("textfield[name='post_title']").attr("maxlength", 10);
});
But it didn't work. Can you assist with this field as well, please?
You can modify the custom codes as below:
jQuery(document).on('cred_form_ready', function() {
jQuery("textarea[name='wpcf-new-submission-story']").attr("maxlength", 1000);
jQuery("input[name='post_title']").attr("maxlength", 10);
});
My issue is resolved now. Thank you!