- Getting Started
- Field Types
- Email Notifications
-
Integrations
- MailerLite
- Create User Accounts with Convert Forms
- MailChimp
- HubSpot
- GetResponse
- AcyMailing
- Content App
- Webhooks Addon
- Facebook Meta Pixel
- Google Adwords
- Sync submissions with your favorite app
- Drip Ecommerce CRM
- Google Analytics
- Constant Contact
- SalesForce Web-to-Lead
- IContact
- Zoho CRM
- Elastic Email
- Zoho Campaigns
- Zapier
- ConvertKit
- Brevo (Sendinblue)
- Campaign Monitor
- AWeber
- ActiveCampaign
-
Functionality
- Scroll the Page to the Top When a Long Form is Submitted
- Display Submissions Count for a Specific Form
- Populate Drop Down, Radio Buttons or Checkboxes with a CSV File
- Automatically Delete Submissions Older Than X Days
- Silently POST Submitted Data to Any API or URL
- Automatically Save Each Submission to a JSON file
- Authenticate and Login a User with a Custom Joomla Form
- Auto-Populate a Form Field with an Article Data
- Add a placeholder text to a Dropdown
- Create Multilingual Forms in Joomla
- Create a custom Joomla User Registration Form
- Redirect User to a URL After Form Submission
- Export and Import Forms across different Websites
- Export Form Submissions to CSV
- Convert Forms
- Styling and Customization
- Payment Forms
- Advanced Features
- Developers
- Troubleshooting and Support
-
Spam, Security & Compliance
- Enforcing a Custom Password Policy in Convert Forms
- Add Cloudflare Turnstile to your Joomla Form
- Implement the Iubenda Consent Database in Joomla with Convert Forms
- Add Custom Validations to Fields and Forms
- Add Math Captcha to your Form
- Prevent a Field From Saving in the Database
- Add hCaptcha to your Form
- Enable Double Opt-in
- Allow Form Submissions in Specific Date Range
- Ensure a Unique Value is Entered Into a
- Block Form Submissions Containing Profanity (Bad Words)
- Block Email Addresses or Email Domains
- Native Convert Forms Anti-spam Protection with Honeypot
- Add reCAPTCHA to your Form
- Create GDPR Compliant Forms
Run PHP with Convert Forms
Are you interested in adding custom PHP code to your Joomla forms? With the Convert Forms PHP app, executing PHP code after each form submission becomes a breeze. Write any PHP code you desire and it will automatically run each time someone submits your form.
This tutorial will guide you through using and configuring the PHP app in Convert Forms.
TABLE OF CONTENTS
Requirements
To use the PHP integration, there are a few requirements you need to meet, listed below:
- Ensure you have Convert Forms Pro installed. You can easily upgrade to Pro if you're currently in the Free version
- The "Convert Forms - Apps - PHP" plugin is enabled.
Setting Up PHP Task
To set up the PHP task and run your PHP code, go into your form, and follow the steps listed below:
Select App
From within your form, click on Tasks > CREATE YOUR FIRST TASK.
On the modal that will open, select the PHP task.
Select New Submission under Trigger and Run PHP under Action on the next screen, and click CONTINUE.
Setup Action
After you've set up the trigger, and action, it's time to set up the action itself and provide your PHP code that will run when the form is successfully submitted.
Add Conditional Logic
Conditional logic makes it possible to run tasks only if specific criteria are met, like a user’s email address matching a certain domain, the user being associated with a certain Joomla User Group, or a form submission having a specific value.
While editing the PHP task, go to the Setup Action step and scroll down to the Conditional Logic section to set up Conditional Logic. Here's where you define all the rules the task should meet to run.
For example, let's say we need to execute our PHP code, only if the email is coming from a specific domain: @domain.com.
- Click to enable the Run this task when certain conditions are met.
- Click Add Your First Condition.
- Select the Email field in the Trigger dropdown.
- Select Contains in the Operator dropdown.
- Enter @domain.com in the value. Replace this with your domain name.
The condition should look like this:
You can read more on Conditional Logic on the Working with Tasks documentation page.
Activate Task
The final step is to enable our task. To do so, click the toggle on the dialog’s top right corner, as shown in the screenshot below.
Finally, click Save to save the task, close the dialog, and then click Save from the top right corner of the form builder to save the changes on the form.
Congratulations! You’ve successfully created a form that executes your PHP code whenever the form is successfully submitted!