Hello
I would like to pre-populate the post_content field on a cred form with the post content where the form is inserted.
I know I can use the value attribute:
[cred_field field='post_content' output='bootstrap' value="[wpv-post-body view_template='None']"]
And this works. However, I would like to be able to format the content, e.g. add extra content and HTML tags.
I know that tinymce fields can be pre-populated using Javascript on the form itself.
I have tried the following but it does not work:
jQuery(document).ready(function() {
tinyMCE.activeEditor.setContent('<p>Some content</p>');
});
Any help would be greatly appreciated.
Many Thanks.
I eventually found a solution here:
https://toolset.com/forums/topic/struggling-with-js-client-side-form-validation/
The correct code is:
jQuery(window).bind('load', function() {
// Your custom validation code goes here using jQuery instead of $
});