Send SMS quotes Forminator Pro

I want to send SMS quotes to visitors after they have filled in a form on a website. But the price would be different in SMS it will be based on visitor’s inputs.

  • Adam Czajczyk
    • Support Gorilla

    Hello Andre

    I hope you’re well today!

    I know that you’ve been suggested to use Zapier integration for this and that’d be recommended way to make Forminator send SMS but if such solution doesn’t fit your needs, the alternative option would require custom development.

    There’d be two pre-requisites that would have to be met. First one is relatively easy and is mostly about the form configuration. You mentioned that the price of the message would be different depending on users choices so you need to have the form created in a way that calculates the “ultimate” price in some specific, single field.

    A good way to do it is to add a “calculations” field (whether it’d be visible or hidden is up to you, you can switch that in field settings) that would act as a sort of “total price” field.

    The second pre-requisite would be to have some SMS gateway already implemented and running on the site. I suppose a plugin such as this one could be of help:

    https://wordpress.org/plugins/wp-sms/

    Please note though: I’ve never tested it and we have no affiliation and are not in any way involved with any SMS gateways/services.

    Basically, having these two pre-requisites met on site should then make it possible to “connect” them together – the form and the SMS solution – with a custom code but such code itself would very much depend on the SMS gateway implementation that you decide to use. You would need to come up with the code that would actually make it send the message on your request, with the content of your choice and the price.

    On Forminator’s end it would require just this: upon submission execute code that reads the value of the “total price” field and then runs your custom function, passing that price to it (and a mobile number as well, I believe).

    I have already asked our developers to take a look into it and see if that would be doable and if so, if we could help you with that so please keep an eye on this ticket and we’ll update you here as soon as we get to know more from them.

    Best regards,
    Adam

  • Andre
    • WPMU DEV Initiate

    Thank you Adam, that sounds excellent and exactly what I’ve been thinking about. I just didn’t know how I would connect WP SMS to Forminator such that it would be able to send the SMS.
    Looking forward to your team’s reply.

  • Adam Czajczyk
    • Support Gorilla

    Hi Andre

    According to the WP SMS plugin description, it supports hooks and WP REST API so there should be a way to “trigger” it by the code. I’m pretty sure as well that its developers would be able to help with this so that is leaving us with finding a way to hook up to Forminator for the start.

    Let’s see what our developers will come up with and we’ll then see what could possibly be done next. I’m still waiting for feedback from them and I’d appreciate some patience as they are dealing with a lot of complex tasks on daily basis – their response time might be a bit longer than ours (as in “support team”:wink: here on forum. But we’ll update you here as soon as we get to know more.

    Best regards,
    Adam

  • Alessandro
    • Staff

    Hello Andre.

    We looked further your issue and developed a snippet to help you make the API Call you need.

    The following snippet requires a form id, and two field, a phone and a price one, or whatever field you like.

    Then, after submission it executes an extra function named wpmudev_forminator_api_make_call.

    There you can add you logic, and make an API call or pass the data to a hook of your choice.

    You can download the snippet here:
    https://gist.github.com/wpmudev-sls/bea5328d354940f11c13dd61885e9f44

    Once downloaded, you can unzip it and upload the wpmudev-forminator-sms-trigger-action_php.php file to your site’s ‘wp-content/mu-plugins’ directory.

    Let us know if this worked for you.

    Kind regards,
    Alex.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.