Title: Remove Notes Textarea / Add custom fields
Last modified: March 6, 2021

---

# Remove Notes Textarea / Add custom fields

 *  [mikeknappe](https://wordpress.org/support/users/mikeknappe/)
 * (@mikeknappe)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/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-down
 * The 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

Viewing 1 replies (of 1 total)

 *  Thread Starter [mikeknappe](https://wordpress.org/support/users/mikeknappe/)
 * (@mikeknappe)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/remove-notes-textarea-add-custom-fields/#post-14175207)
 * If you have problems, that characters like ä, ü, ß or ☻ are not stored well and
   you see unescaped UTF-8 sequences like “u00fc” in the custom field data, it’s
   maybe because of “JSON.stringify”.
 * Visit file “bookme-pro-free-appointment-booking-system/frontend/assets/js/bookme-
   pro.js” on line 1384:
    `custom_fields[key] = {custom_fields: JSON.stringify(custom_fields_data)};`
   Change it to:
 *     ```
       var json_str = JSON.stringify(custom_fields_data);
       var utf8_str = json_str.replace(/[\u007F-\uFFFF]/g, function(chr) {
           return "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).substr(-4)
       })
       custom_fields[key] = {custom_fields: utf8_str };
       ```
   
 * There you go.
 * Best regards,
    Mike

Viewing 1 replies (of 1 total)

The topic ‘Remove Notes Textarea / Add custom fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bookme-pro-free-appointment-booking-
   system_9da0e4.svg)
 * [Bookme Pro - Online Appointment Booking and Scheduling Plugin](https://wordpress.org/plugins/bookme-pro-free-appointment-booking-system/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bookme-pro-free-appointment-booking-system/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bookme-pro-free-appointment-booking-system/)
 * [Active Topics](https://wordpress.org/support/plugin/bookme-pro-free-appointment-booking-system/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bookme-pro-free-appointment-booking-system/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bookme-pro-free-appointment-booking-system/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [mikeknappe](https://wordpress.org/support/users/mikeknappe/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/remove-notes-textarea-add-custom-fields/#post-14175207)
 * Status: not resolved