Remove Notes Textarea / Add custom fields
-
Dear Community,
if you want to remove the notes textarea, go to your DB (phpMyAdmin), move to wp_<suffix>_options, search for bookme_pro_custom_fields and modify it to your needs.
The content is simple JSON. By default you should see:
[{“type”:”textarea”,”label”:”Notes”,”required”:false,”id”:1,”services”:[]}]To remove it simply type only this:
[{}]If you want to extend it for example with a text-field for street:
[{“type”:”textarea”,”label”:”Notes”,”required”:false,”id”:1,”services”:[]},{“type”:”text-field”,”label”:”Street”,”required”:true,”id”:2,”services”:[]}]Types should be:
textarea
text-field
checkboxes
radio-buttons
drop-downThe problem is, that within “bookme-pro-free-appointment-booking-system/frontend/controllers/booking/templates/4_details.php” only the text-area is implemented.
So if you need for example a text-field, put the following after line 80:<?php elseif ($custom_field->type == 'text-field') : ?> <input id="custom_field_<?php echo esc_attr($custom_field->id) ?>" type="text" class="bookme-pro-custom-field form-control" value="<?php isset($cf_item['data'][$custom_field->id]) ? $cf_item['data'][$custom_field->id] : null; ?>"/>Now you are able to extend/use text-fields.
For other elements look at “bookme-pro-free-appointment-booking-system/backend/controllers/calendar/templates/_customer_details_dialog.php”, there are all types nearly with full code implemented to copy/adapt them to/for 4_details.php.
Best regards,
Mike
The topic ‘Remove Notes Textarea / Add custom fields’ is closed to new replies.