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

Hidden fields for forms #719

Open fredericalpers opened 5 months ago

fredericalpers commented 5 months ago

Initiative

Improve forms of the onOffice for WP-Websites Plugin for a better user experience.

Epic

Implement hidden fields for forms.

User story

As a real estate agent utilizing the onOffice for WP-Websites Plugin, I encounter scenarios where certain form fields need to be hidden from customers in the frontend. This is crucial for initiating internal processes upon receiving form submissions. Presently, the plugin lacks the functionality to designate form fields as hidden. Therefore, I propose the implementation of a feature that allows me to easily mark designated form fields as hidden using a checkbox. These hidden fields should remain invisible to customers in the frontend while being transmitted both in the email notification and the attached XML file upon form submission.

The ability to set form fields as hidden is essential for streamlining internal processes triggered by form submissions. This feature is especially valuable for real estate agents who need to capture specific data for internal workflows while maintaining a seamless and uncluttered user experience on the frontend.

By successfully implementing this hidden form field functionality, the onOffice for WP-Websites Plugin can significantly enhance the flexibility and utility of forms for real estate agents.

Further links

Hidden field disabled in Backend: hiddenfield1-backend

Hidden field disabled in backend - Frontend display: hiddenfield1-frontend

Hidden field enabled in Backend: hiddenfield2-backend

Hidden field enabled in Backend - Frontend display: hiddenfield2-frontend

yeneastgate commented 5 months ago

@fredericalpers

  • Note: GDPR status and TOS should never be marked as hidden for legal reasons.

Please, confirm for me the fields that you mentioned:

These hidden fields should remain invisible to customers in the frontend while being transmitted both in the email notification and the attached XML file upon form submission.

=> We only implement send "default value" to formData. Do you agree with my solution? image

  1. On the other hand: Will we not implement adding "hidden field" checkbox in the "Applicant Search Form", right?

Note: Old users need to update the template.dist folder to use this feature.

I have implemented it in the branch (https://github.com/onOffice-Web-Org/oo-wp-plugin/tree/44694-hidden-fields-for-forms), please review it and let me know your opinions. Thanks!

fredericalpers commented 5 months ago

GDPR status <=> GDPR Status (key: DSGVOStatus) or GDPR (Checkbox) (key:gdprcheckbox) TOS <=> Terms and Conditions Accepted (key: AGB_akzeptiert)

For GDPR status both should never be able to be made hidden. Yes I can confirm that the TOS is AGB_akzeptiert.

We only implement send "default value" to formData. Do you agree with my solution?

This sounds good to me. Please implement the suggested solution

On the other hand: Will we not implement adding "hidden field" checkbox in the "Applicant Search Form", right? yes, it would not make sense to implement this feature for applicant search form.

yeneastgate commented 5 months ago

@fredericalpers I got it, thanks!

yeneastgate commented 4 months ago

@fredericalpers Let me test it again before you change it to in-review, thanks !

yeneastgate commented 4 months ago

@fredericalpers I have finished the testing. Please help us review it, thanks!

https://github.com/onOffice-Web-Org/oo-wp-plugin/assets/104892108/58ef44f5-e80b-4efe-a1be-d484b1c0062c