Title: Add a form_type
Last modified: July 23, 2018

---

# Add a form_type

 *  Resolved [qrtpro](https://wordpress.org/support/users/qrtpro/)
 * (@qrtpro)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-a-form_type/)
 * Hi, I’ve seen where to edit the Salesforce API url. Would it be possible, however,
   to have more than one destination url? One for testing and one for production?
   Can I add a form_type? Something like this:
 * if ($ form_type == ‘case’) {
    $ url = ‘[https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8&#8217](https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8&#8217);;}
   else { if ($ form_type == ‘lead_test’) { $ url = ‘[https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8&#8217](https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8&#8217);;}
   else { $ url = ‘[https://test.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8&#8217](https://test.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8&#8217);;}}
 * Thank you so much and sorry for my english !!!
    -  This topic was modified 7 years, 10 months ago by [qrtpro](https://wordpress.org/support/users/qrtpro/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Nick Ciske](https://wordpress.org/support/users/nickciske/)
 * (@nickciske)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-a-form_type/#post-10520420)
 * Sure, simply use the **salesforce_w2l_api_url** hook and switch the URL dynamically
   based on your environment (e.g. a constant in wp_config, environment variable
   or checking the hostnames).
 * Form type should not be altered as the form type is the same in production or
   development and changing it will cause unexpected results. It’s the environment
   that has changed, so check for that and return a different URL based on both (
   environment and form type).
 *  Thread Starter [qrtpro](https://wordpress.org/support/users/qrtpro/)
 * (@qrtpro)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/add-a-form_type/#post-10525637)
 * Thank you very much for your availability

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add a form_type’ is closed to new replies.

 * ![](https://ps.w.org/salesforce-wordpress-to-lead/assets/icon-256x256.png?rev
   =2316786)
 * [Brilliant Web-to-Lead for Salesforce](https://wordpress.org/plugins/salesforce-wordpress-to-lead/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/salesforce-wordpress-to-lead/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/)
 * [Active Topics](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/salesforce-wordpress-to-lead/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [qrtpro](https://wordpress.org/support/users/qrtpro/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/add-a-form_type/#post-10525637)
 * Status: resolved