09/09/2013 at 11:40 pm
#268828
Keymaster
@ Janet
The only way to make the bio a required field is to make a small edit to the connections_form.php file.
Search for this line:
$out .= '<textarea rows="20" cols="40" name="bio" id="cn-form-bio"></textarea>';
Change it to this:
$out .= '<textarea class="required" rows="20" cols="40" name="bio" id="cn-form-bio"></textarea>';
You will than have to disable the rich text editor by setting the rte shortcode option to FALSE; like so:
[connections_form rte=FALSE]
That’s the easiest. If you really want the rich text editor; the change is not harder but does appear like it is because of where the change has to be made. Here’s how:
Search for this block of code:
wp_editor( $entry->getBio(),
'cn-form-bio',
array
(
'media_buttons' => FALSE,
'wpautop' => TRUE,
'textarea_name' => 'bio',
'tinymce' => array
(
'theme_advanced_buttons1' => 'bold, italic, underline, |, bullist, numlist, |, justifyleft, justifycenter, justifyright, |, link, unlink, |, pastetext, pasteword, removeformat, |, undo, redo',
'theme_advanced_buttons2' => '',
'inline_styles' => TRUE,
'relative_urls' => FALSE,
'remove_linebreaks' => FALSE,
'plugins' => 'inlinepopups,spellchecker,tabfocus,paste'
),
'quicktags' => array
(
'buttons' => 'strong,em,ul,ol,li,close',
)
)
);
And change it to this:
wp_editor( $entry->getBio(),
'cn-form-bio',
array
(
'media_buttons' => FALSE,
'wpautop' => TRUE,
'textarea_name' => 'bio',
'editor_class' => 'required',
'tinymce' => array
(
'theme_advanced_buttons1' => 'bold, italic, underline, |, bullist, numlist, |, justifyleft, justifycenter, justifyright, |, link, unlink, |, pastetext, pasteword, removeformat, |, undo, redo',
'theme_advanced_buttons2' => '',
'inline_styles' => TRUE,
'relative_urls' => FALSE,
'remove_linebreaks' => FALSE,
'plugins' => 'inlinepopups,spellchecker,tabfocus,paste'
),
'quicktags' => array
(
'buttons' => 'strong,em,ul,ol,li,close',
)
)
);
That should do it. I hope that helps!
