Extra comment Field ( drop down list) Guys use your brain
Well guys i have been trying to create a custom field for comments What i want is to create a drop down list, where users ( i suppose user can comment without registration) select an option from drop down Lets say option called Recommend and having 3 options, Yes, NO, Maybe while posting a comment.
I have tired many plugin but it doesnt really work....
The Plan: lets make a custom field admin>classipress>custom field > but do not include it in ad new form, instead call for this specific field (suppose drop down) in theme-comment.php
what i am asking how to call for specific field and will it be saved in db ? the code below display all custom field calls for all drop down in add new form
<select name="<?php esc_attr_e($result->field_name); ?>" id="<?php esc_attr_e($result->field_name); ?>" class="dropdownlist <?php if ($result->field_req) echo 'required' ?>">
<option value="">-- <?php _e('Select', 'appthemes') ?> --</option>
<?php
$options = explode( ',', $result->field_values );
foreach ( $options as $option ) {
?>
<option value="<?php esc_attr_e($option); ?>"><?php esc_attr_e($option); ?></option>
<?php
}
?>
</select>
once the field input is saved in db it can be called easily any help ? or comment ?