how to set adminnotification mail subject to be custum depend on form dropdown option value

am using a gravity-form in this we have one drop down like

<select name="input_20" id="input_5_20" class="medium gfield_select" tabindex="5"><option value="" selected="selected">Please choose </option>
<option value="test1">Test1</option>
<option value="test2">Test2</option>
<option value="test3">Test3</option>
<option value="test4">Test4</option>
<option value="test5">Test5</option>
<option value="test6">Test6</option>
<option value="test7">Test7</option>
<option value="other">Other</option></select> 

here when i select a Test1,Test3,Test7
the admin notification mail subject to be like guest

if other i select the other options admin notification mail subject to like user

how to do this this in this??? i found to change subject of admin admin notification
like

add_filter('gform_notification', 'wpse153070_change_subject', 10, 3);
function wpse153070_change_subject( $notification, $form, $entry ) {
     if($notification["name"] == "Admin Notification"){
    $notification['subject'] = "user";
    return $notification;
     }
}

in functions.php
but how to find the which option is selected in dropdown here ??
thanks in advance

Read more here: how to set adminnotification mail subject to be custum depend on form dropdown option value

Leave a Reply

Your email address will not be published. Required fields are marked *