Developer/IT > Whisbi API > API Reference > One-to-One > Inputs config

Inputs config


Notice: rest_validate_value_from_schema was called incorrectly. The "type" schema keyword for can only be one of the built-in types: array, object, string, number, integer, boolean, and null. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /nas/content/live/whisbihc/wp-includes/functions.php on line 5229

Object containing the properties for an input field on a One-to-One form

NameDescriptionRequired
visible Boolean It determines if the field must be shown. Optional
mandatory Boolean It determines if the field is mandatory or optional. If visible is set to false, mandatory must be set to false also. Optional

Extra input config

Object containing the properties for the extra (custom) field on a One-to-One form

NameDescriptionRequired
visible Boolean It determines if the field must be shown. Optional
mandatory Boolean It determines if the field is mandatory or optional. If visible is set to false, mandatory must be set to false also. Optional
placeholder String The placeholder text to be displayed in the extra field Optional
options Array An array of options to be selected in the custom field. If provided, the field will be a <select> instead of a free text input
Example: [{value: ‘value_1’, label: ‘my option 1’}, {value: ‘value_2’, label: ‘my second option’}]
Optional

Schedule exceptions

Object containing a list of specific dates with a special time schedule, different from the one set on availableHours

SYNTAX

Follow this syntax to set a different schedule for a given date

exceptions: {
'date': [
['from', 'to']
]
Or
'date': [] //No service during this specific date
}
Copy Code

EXAMPLE

exceptions: {
'11-12-2018': [
['12:00', '14:00'],
['16:00', '18:00'] //This day will have a different schedule to the one set for this weekday
],
'12-12-2018': [] //This day will be a non-working day
'14-12-2018': [] //This day will be a non-working day
'15-12-2018': [] //This day will be a non-working day
}
Copy Code

Following the example, on December 11th, the available times are the ones specially set for that day, and the dates 12th, 14th and 15th of December are unavailable.