wordpress register form to salesforce - wordpress

I'm wondering if it's possible to use a saleforce form for registering users on wordpress so that when a user registers on the frontend their details are sent to saleforce CRM?

The answer would vary depending on what form tool, if any, you're using, but lately I've been using Gravity Forms and have had great success with connecting to Salesforce via a custom Gravity forms redirect confirmation.
Once you have a form built in Gravity Forms, go to Form Settings > Confirmations. Edit the default Confirmation and change to Type "Redirect". You'll want to post the form to Salesforce's Web-To-Lead API, so enter https://www.salesforce.com/servlet/servlet.WebToLead in the Redirect URL field.
You'll then pass the fields you need via a query string, so check the 'Pass Field Data Via Query String' box, then configure the query string with Salesforce field names and Gravity forms merge tags. There are a couple required parameters including the encoding, your Salesforce Company ID, and a return URL to redirect back to after the form is submitted.
Leave off the ? to begin the query string, so it looks like
encoding=UTF-8&oid=0123456789&retURL=http://example.com
then add fields such as first name, last name, company, country, etc. by adding a parameter for each and selecting the appropriate Gravity Form merge tag from the menu on the right. It will end up looking something like
&first_name={First Name:1}&last_name={Last Name:2}&company={Company:3}
You can also send data to custom fields in Salesforce if you find the field ID. The easiest way to do this is by creating a Web-to-lead form in Salesforce and copying the field's name.
All together, your confirmation should look something like this -
For bonus points, you could add a hidden field to the form for the Return URL and populate it dynamically on the page, either by pulling the current page URL, or adding a custom field to choose a Return URL dynamically.
If you're not using Gravity Forms, you can still use Salesforce's Web-To-Lead tool by creating your own form, or using theirs, and sending the data in a query string.

There are various plugins that allow you to send data to Salesforce from a form, such as WordPress-to-lead for Salesforce CRM.
It is also possible to use the Salesforce API to build a single signon, and register users to or from either service. I built one for SugarCRM, which you can view the code for it at Github to get an idea of how it might work with Salesforce.

Related

Autofill a form in WordPress

I am using WordPress for building my own website, And I created a form using WP form plugin and users are supposed to fill this form after entering the site and I want parts of the form to be filled automatically for them according to the login information, i.e. name.
So my question is, how can I do this?
You can use jquery or javascript, take ID of that field and run ajax on page load you will get info of use logged in and put that in your field by using jquery parameter .val()

Add Favourites to create a list then email list as part of an enquiry form

I have a client that wants a property directory, but they want users to be able to favourite multiple properties - then view their favourite properties on separate page - then send all those properties to a single email address as part of an enquiry.
cannot see how to do this using agentpress framework
You have two options, the first is to save as properties in session. The second if users are logged in to Wordpress is to use admin-ajax to add the properties as a meta data of the user. So this way you can access these meta infos using get_user_meta();
Documentation:
https://codex.wordpress.org/Function_Reference/get_user_meta
https://codex.wordpress.org/Function_Reference/add_user_meta
https://codex.wordpress.org/Function_Reference/update_user_meta

How to use Gravity Form to validate customer's information from .csv

I am trying to use Gravity Forms to make a payment page in WordPress. The first three fields are customers name, order number and postcode and the last one is eway payment. I want to check the customer's name, order number and postcode through an Excel form before make payment. If the validation is successful, the last section will be active. Are there any add_ons or do I need to change the code? I actually have the code but I do not know where to put it. Thanks.
Gravity Forms does have a couple of hooks you can use in your theme functions file or a custom functionality plugin to perform your own validation.
The gform_field_validation filter can be used to perform custom validation of a specific field.
The gform_validation filter can be used to validate the entire form.

Create a contact form and display submissions as searchable directory

I want to create a directory that users can submit their data (name, email, phone) to and see a searchable directory. Ninja Forms was good for submitting data, but had no (free) option to display the data in a searchable format. I tried using Contact Form DB, but the displayed results weren't searchable.
The Gravity Forms plugin has an API that will allow you to access submitted data. Here is a similar query to your own:
https://wordpress.stackexchange.com/questions/82791/how-do-i-show-data-from-gravity-forms-in-my-template
That said, it would probably be just as easy (if not easier) to code this outside the WordPress framework. Create a new table in the database for user data, then create the corresponding form and PHP form handler to write the details to the table.
WordPress provides a class for explicitly accessing the database:
http://codex.wordpress.org/Class_Reference/wpdb
You would then simply add your search code into a page template. I hope this helps!

Email to node author in Drupal 7

Drupal 7:
I need a module to append a contact form to a node of a specific content type. The form should be configurable and permit to send an email with an attachment to the node author. The form should also have a captcha. The email must not be saved in the database.
Does such module exists or do i need to develop it ?
You should be able to achieve this through the combination of the webform module, CAPTCHA module and a custom module.
Webform defines it's own 'webform' content type, but it also allows you to make other content types webform enabled by visiting 'admin/config/content/webform' and selecting the appropriate content type.
The token module provides node tokens such as nid and title which can be included as a hidden form element, but annoyingly, doesn't include the author as a token.
On the email tab of your webform, it's possible to choose a form component as the email address to send the form results to. I would create a hidden field, leaving the default value blank and then it should be fairly easy to add the node author value to it in a custom module using hook_form_alter (form id can be found by viewing source and looking for the hidden input 'form_id'). You can then use this form component in the email tab to send the results to.
The only thing I can see causing an issue is that there isn't an easy way to stop webform recording the form result in the database - I would imagine this would be achievable in a custom module without too much hassle though.
Yop, there is such a module. It's called Webform. Using Webform you can add a block form under certain node type with predefined fields and let send email directly to the node author.
Download and enable Webform 4.x
Create new from, add desired fields
Under E-mails tab for Address use token [current-page:node:author:mail]
In Form settings tab check Available as block
Configure newly enabled block (show only under certain node type + set restricted pages to the node/*/*)
Do tests
You can find printcreens and more detailed instructions here.

Resources