Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use shortcodes #15

Open
simonmanuel opened this issue Oct 15, 2024 · 8 comments
Open

Ability to use shortcodes #15

simonmanuel opened this issue Oct 15, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@simonmanuel
Copy link

While mosparo works well with the included integration, there is no possibility to add shortcode to invoke mosparo in a custom HTML form.

While it is possible to do this using the Custom Integration approach, it'll be nice to have this functionality included in the WP plugin since most (or all) users are used to using shortcodes all over the website.

@zepich
Copy link
Member

zepich commented Oct 15, 2024

Hi @simonmanuel

Thank you very much for your great suggestion!

It would be no problem to add a shortcode to display the mosparo form in a post, page, or other part of WordPress.

However, the main problem with such a shortcode is the backend verification. mosparo has a frontend validation of the content before the user can submit the form and a backend verification executed in the backend code of a website after the user submits the form so that nobody can manipulate the submitted data.

With the ability to add a shortcode somewhere to display/integrate a mosparo box, we would need some backend logic to verify these requests before they are processed with your normal process (for example, sending an email or storing data into a database). If we use only the frontend validation in a form and not the backend verification, mosparo is more or less useless because an attacker could skip mosparo.

Do you have an idea how we could handle the backend verification, or do you have a precise use case for which we may be able to find a solution? Or do you use another form plugin for which we do not offer a module yet?

Kind regards,

zepich

@simonmanuel
Copy link
Author

Thank you for your prompt response @zepich

TL;DR - Please add a module for Forminator in the WordPress plugin

I now see the complexity of the issue. Most of what I do is by trial & error so please excuse the lack of knowledge.

Why I started looking into mosparo:
I use Listmonk to manage my newsletters. A basic html form is created and I copy/paste the same on my website. Though it contains a honeypot, there were about 300+ spam submissions in 48 hours.

So I switched to using Forminator (WP plugin) that I have been using successfully with almost no spam (using inverse logic, eg. if checkbox is checked, submission is invalid/no longer possible). Not ideal, but it gets the job done.

My interest in mosparo increased when I came across the addition of PoW in v1.3 (using altcha right now with varying success).

It would be really nice if we could add a module for Forminator since it's a versatile plugin that handles forms, quizzes & more (not sure if that'll add complexity to integrating mosparo).

Please let know if I can help in any way possible.

Thanks & Regards,
Simon

@zepich
Copy link
Member

zepich commented Oct 16, 2024

Hi @simonmanuel

Thank you very much for your answer and the details.

When we initially developed the plugin, we also tried to add a module for Forminator (we tried to integrate the most used form plugins), but because Forminator was not flexible enough, we weren't able to add the module.

But we did that more than two years ago, and I think it's time for another try. Our problem back then was that we couldn't add the custom field type for Forminator - but your suggestion with the shortcode is a great alternative. Maybe we can add mosparo to Forminator with a simple shortcode. I will have a look if an integration is possible and will inform you as soon as I know more.

Thank you very much for your help and idea!

Kind regards,

zepich

@zepich zepich self-assigned this Oct 16, 2024
@zepich zepich added the enhancement New feature or request label Oct 16, 2024
@zepich
Copy link
Member

zepich commented Oct 17, 2024

Hi @simonmanuel

I've investigated the Forminator plugin code and found the required filters and functions, so integrating mosparo is possible, and I'm working on the required module. I've already tested it with a simple form, and it worked correctly. The integration works without shortcodes and simply adds the mosparo field directly to the Forminator form above the submit button.

I don't know when the work will be finished, but I think a new version of the WordPress plugin will be released within the next 2 to 3 weeks.

Thank you again for your idea. I don't understand why I didn't have this idea before!

Kind regards,

zepich

@simonmanuel
Copy link
Author

Thank you for looking into it so quickly @zepich. I'm excited for the Forminator module.

I'm not willing to admit the number of times the answer was right in front of me and I've missed it. Glad we could get around a working solution.

Will wait in anticipation for the release. Thank you for all the work you do.

Regards,
Simon

zepich added a commit that referenced this issue Oct 30, 2024
@zepich
Copy link
Member

zepich commented Nov 3, 2024

Hi @simonmanuel

As announced, we released version 1.12.0 of the mosparo Integration plugin for WordPress on October 31st, 2024.

It contains the new module to protect Forminator forms.

We're looking forward to your feedback. Thank you very much for your help and suggestions!

Kind regards,

zepich

@simonmanuel
Copy link
Author

Hi @zepich

I'm excited to try it out. Travelling this week and I'll be back early next week. Will try it earlier if possible.

Thanks a ton for all your hard work!

Regards,
Simon

@zepich
Copy link
Member

zepich commented Nov 8, 2024

Hi @simonmanuel

No stress! Have a safe journey!

And thank you very much for your kind words!

Kind regards,

zepich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants