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

Customization of standard e-mail subjects for forms #881

Open fredericalpers opened 4 weeks ago

fredericalpers commented 4 weeks ago

Customization of standard e-mail subjects for forms

Introduction

As a website owner, I would like to customize the standard e-mail subjects for various forms on my website and provide them with a fixed prefix so that the messages are easily recognizable in onOffice enterprise and at the same time there is the possibility to customize the subject lines.

User Story

The purpose of this user story is to customize the standard email subjects for various forms (owner form, prospect form, contact form, newsletter) on the website. The subject should contain a fixed prefix [onOffice-WP] by default. At the same time, the website operator should be able to customize the rest of the subject line. Dynamic content (such as the property ID) can be integrated via “tags/pills”, similar to the handling of meta tags in Yoast.

This customization aims to improve the clarity and precision of email subject lines generated by the forms on the website, while meeting the necessary technical requirements for integration with onOffice enterprise. The ability to insert dynamic content should ensure that the subject lines are relevant and informative.

Task / Requirements

The following should be available for selection in the tags/pills:

Standard subject lines for forms: Owner form: Message from the owner form of your website. Prospect form: Message from the interest form on your website. Contact form: Message from the contact form of your website. Newsletter form: New newsletter registration

Example for a subject: EDIT: Inquiry form for the estate agent on a detail page changed to “Inquiry for property (Tag/Pill estateID)” in the e-mail it would be displayed as: "Inquiry for property 99".

yeneastgate commented 3 weeks ago

@fredericalpers After investigating, I need you to confirm the following:

  • message field, GDPR checkbox and general terms and conditions should not be available for selection even if added to the form.

Inquiry form for the estate agent on a detail page changed to “Inquiry for property (Tag/Pill estateID)” in the backend would be displayed as: "Inquiry for property 99".

Please refer to the video for more information.

https://github.com/user-attachments/assets/ac2fd6d5-53be-4131-b1d2-a87fbe7b607a

fredericalpers commented 3 weeks ago

Do you want to display all fields except for specific ones like message, GDPR (Checkbox), and GDPR status? If checkbox or radio values are displayed, how would you like them to display in the subject when send mail? Could you provide a specific example?

Yes all fields should be available except the mentioned ones above. For Radio buttons only the fields with value "1" should be available. For Checkboxes with multiples values such as the field "Beziehung" all values should be available. The fieldname does not have to be displayed, simply their values should be displayed.

The implementation as described is not feasible. When editing the subject, we cannot determine the exact estateID on the backend. We can only obtain the precise estateID on the frontend. As a result, we can only displaying only the Tags/Pills.

This had a typo and was supposed to be. "in the e-mail it would be displayed as: Inquiry for property 99." I have edited the initial issue.

yeneastgate commented 2 weeks ago

@fredericalpers I have implemented this feature and here is the demo video:

https://github.com/user-attachments/assets/7b83ba2c-cbd0-4e30-82af-ec76cef93a4d

However, I still need to confirm a few things to complete this task:

  1. Regarding the interface: image => Do you want to make any changes to the interface for this input subject email?

  2. About the tags/pills: Will they be based on the fields config or all fields in the form? image

fredericalpers commented 2 weeks ago

Do you want to make any changes to the interface for this input subject email?

the size of the subject field and the pills must be kept the same as the other fields.

About the tags/pills: Will they be based on the fields config or all fields in the form?

As mentioned in the task / requirements it should be the fields added to the form.

yeneastgate commented 2 weeks ago

the size of the subject field and the pills must be kept the same as the other fields.

I will refactor the CSS to ensure this.

As mentioned in the task / requirements it should be the fields added to the form.

I will research and find a solution for this functionality.

yeneastgate commented 2 weeks ago

@fredericalpers I have made the requested changes and here is the demo video: https://files.fm/f/56tdqchaw7

Please check and let me know your opinion. Thanks!

fredericalpers commented 1 week ago

Hi @yeneastgate,

The current implementation is working well, and I appreciate the progress so far. However, there are a few small adjustments that still need to be made.

According to the task and requirements, we need to add a button that allows users to insert variables directly, as not everyone may be aware that simply typing "%" in the input field is sufficient. Upon clicking this button, a dropdown should appear with the available options for selection. Please see the examples below.

Please let me know if you need any further clarification on this.

Thanks for your effort!

email-subject

email-subject-button

yeneastgate commented 1 week ago

Hi @yeneastgate,

The current implementation is working well, and I appreciate the progress so far. However, there are a few small adjustments that still need to be made.

According to the task and requirements, we need to add a button that allows users to insert variables directly, as not everyone may be aware that simply typing "%" in the input field is sufficient. Upon clicking this button, a dropdown should appear with the available options for selection. Please see the examples below.

  • [ ] Button colors: color: #646970; border-color: #646970; background: #f6f7f7;

Please let me know if you need any further clarification on this.

Thanks for your effort!

email-subject

email-subject-button

I got it! thanks

yeneastgate commented 1 week ago

@fredericalpers I added the button, please take a look at my demo video and let me know your opinions. Thanks!

https://github.com/user-attachments/assets/07ee6079-4ae3-4bab-9388-9ebe78bf8626