Thanks @noapi1.
I am behind on documentation.
A required checkbox is a frequent request and I plan to add it eventually. Frankly, it seems unnecessary since the act of submitting a testimonial implies use of its content. But I understand the appeal.
The original purpose of the shortcode field was to add links for “Tweet this!”, etc. from another plugin. The shortcode field can be a generic approach to add whatever you want to the form so it could be used to add a checkbox and store the value somewhere but you would need to write that code or hire a developer. In your case, you would need the shortcode on the form but not on display.
Thread Starter
noapi1
(@noapi1)
Thank you!
Such a checkbox IS in deed unnecessary, but if you live in “the other galaxy”, also called EU or Germoney, you HAVE to implement thousands of stupid and really obvious things in your site for the only purpose of bureaucracy (see this silly cookie-plage).
I am able to make the code by myself as I am a developer, but how can I tell your form to make the checkbox mandatory and to show the red error-message if it is not clicked? If I make it mandatory nothing happens and I can’t send the form. I only need a little hint, as the ckeckbox is already implemented and visible with my own shortcode, but there is no function behind.
Thank you.
Ah, yes, I see now.
The plugin uses the jQuery Validation plugin so if you add the “required” HTML attribute to your field it should be included in the validation process. (I have not tested that.)
Alternatively, you could enqueue some JavaScript that disables the submit button if the checkbox is off.
Thread Starter
noapi1
(@noapi1)
Thanks, done. required did the trick.