This thread is resolved. Here is a description of the problem and solution.
Problem:
How to change the "No parent" text in select a parent from a drop down field. Solution:
Use no_parent_text='Your text' in the field shortcote.
This support ticket is created 8 years, 1 month 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I am trying to: I have a cred where I have to select a parent from a drop menu list. Works fine, but this "No parent" option is annoying. I am trying to change the text "No parent" to "select...". Any clue please? I found one post in the forum about the same issue but it does not give a solution
Thank you
I would like to thank you for pointing this issue to us at the support forum and I’ll report this as a feature request if its possible to add “No Parent” text to CRED form text block.
I'll ask our developers to add an extra option to enable "No parent" to be changed to whatever the user chooses.
Meanwhile please keep using your JS workaround.
I'll keep you posted when I'll hear back on this subject from our developers.
Please let me know if you need further info about this.
Dear Itamar,
Thanks for the following up. Yes, indeed, it works! However, how do I force the user to select a value other than "Select" for this parent field?
Actually, I did it with the validation Hook (see below), but is there a straightforward method?
add_filter('cred_form_validate','my_validation',10,2);
function my_validation($field_data, $form_data)
{
//field data are field values and errors
list($fields,$errors)=$field_data;
//uncomment this if you want to print the field values
//print_r($fields);
//validate if specific form
if ($form_data['id']==524)
{
//check my_field value
if ($fields['_wpcf_belongs_acad-years_id']['value']!='Select')
{
//set error message for my_field
$errors['_wpcf_belongs_acad-years_id']='Please select an academic year!';
}