Hey @mitsakos999,
Yes, you can surely do it.
here you have the code snippet which you can use to achieve this:
add_filter( 'pirate_forms_public_controls', 'pf_add_subject_dropdown' );
function pf_add_subject_dropdown( $elements ) {
foreach ( $elements as $key => $element ) {
if ( $element['id'] === 'pirate-forms-contact-subject' ) {
$elements[ $key ]['type'] = 'select';
$elements[ $key ]['options'] = array(
'My subject option 1' => 'My subject option 1',
'My subject option 2' => 'My subject option 2',
'My subject option 3' => 'My subject option 3'
);
}
}
return $elements;
}
Obviously you need to replace the select option with your values.
Thank you for your fast answer, it works great
Is there any way to make the first option something like a placeholder, or not a valid option..so the user will have to select some of the remaining choices ?
I m marking this as resolved 🙂
Great support