onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Range fields can not be set as required #493

Closed fredericalpers closed 1 year ago

fredericalpers commented 1 year ago

Discussed in https://github.com/onOffice-Web-Org/oo-wp-plugin/discussions/484

Originally posted by **fredericalpers** April 4, 2023 ### Current state Some fields in interest forms are range fields with two inputs, the lower and upper limit (“from” and “to”). An example is “Kaufpreis” (purches price) in https://testinstanz-fal.onofficeweb.com/interessentenformular/ When such a field is marked as “required” in the WordPress backend, the form can not be sent. That field is then always considered missing, even when the user actually has filled in the values as required. The cause of this is that the field is transformed to a range by adding “__von” and “__bis” to its field name (e.g. “kaufpreis__von”). The check for missing fields does not consider this and thus wrongly determines that the original field (e.g. “kaufpreis”) is missing. ### Desired state The check for missing fields needs to consider the “from” and “to” fields, so the lower and upper limits can be filled in, even when the field is marked as required.
yeneastgate commented 1 year ago

@fredericalpers I fixed, you can watch the video below and give me your feedback

https://user-images.githubusercontent.com/104892108/234189377-9315dec0-189a-4940-8a29-5105d3874976.mp4

fredericalpers commented 1 year ago

@fredericalpers I fixed, you can watch the video below and give me your feedback

range_field.mp4

Thank you! Looks good to me. We will test it on our end now :)