function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vinayak SavadiVinayak Savadi 

Can we stop creation of Lead records from Wordpress

Hi ,

We are using Wordpress integration with Salesforce to create Leads from web.

Expected behaviour : Leads to be created on submission of FORM1 which is configured in force.com site
Error Scenario : Leads are also generated from FORM2 which is not configured in force.com site but present in Wordpress, Can we stop this creation of Leads from FORM2.

Thanks in advance
{!pramod_nishane}{!pramod_nishane}
Hi Vinayak,

As you have Wordpress salesforce integration and you must have that FORM2 hosted on Wordpress site with web to lead form generated through salesforce.
So if you want the lead creation only from FORM1 that is from force.com sites then you can remove that web to lead code from FORM2 (Wordpress code).

As in wordpress the same code is there to create lead so it will work as expected, better to keep it at single place.

Let me know in case of any concerns.

Please mark this answer as the solution/ best answer if it solves your purpose so that it can help other community members.

Thanks,
Pramod Nishane
Salesforce Consultant
Varasi LLC
www.varasi.com
Vinayak SavadiVinayak Savadi
Hi Pramod,


Thanks for reply.

Neither of the FORM1 nor FORM2 contains web to lead code in it.But the FORM1 is Visualforce page with simple controller to create Lead record.This is configured as a iframe in wordpress.FORM2 is simple contact 7 form with plain html content.
{!pramod_nishane}{!pramod_nishane}
Hi Vinayak,

Thanks for the information,As i understood FORM1 is Visualforce-Apex logic to create Lead.
So now our concern is FORM2 which you said it is plain html content.

For more clarity,it will be great if you share FORM2 html code so that we can get to know what is exatly happenning in background.

Thanks,
Pramod Nishane
(pramod@varasi.com)
Salesforce Consultant
Varasi LLC
www.varasi.com
Vinayak SavadiVinayak Savadi
Hello Pramod,

Thanks for your concern,
Below one is the HTML code representing FORM2.On click of the submit button there is no specific funtion but some mail is configured with few recipients.

<table>
    <tr>
            <td><label>Child&#39;s First Name</label></td><td>[text first_name 20/40]</td>
    </tr>
    <tr>
            <td><label>Last Name</label></td><td>[text* last_name 20/80]</td>
    </tr>
    <tr>
            <td><label>DOB (Mandatory)</label></td><td><span>[text* N90000006pBvg 12/]</span></td>
    </tr>
    <tr>
            <td><label>Date Applying</label></td><td><span>[text* N90000006pBvf  12/]</span></td>
    </tr>
    <tr>
            <td>
                <label>Club</label>
            </td>
            <td>
                [select* company "select"   "] 
            </td>
    </tr>

    <tr>
            <td><label>Parents/Carers Name</label></td><td>[text N90000006q7tl 20/40]</td>
    </tr>

    <tr>
            <td><label>Disability</label></td><td>[text N90000006pBvi 20/255]</td>
    </tr>

    <tr>
            <td><label>Street Address</label></td><td>[textarea street 60x3]</td>
    </tr>
    <tr>
            <td><label>Suburb</label></td><td>[text city 20/40]</td>
    </tr>
    <tr>
            <td><label>Postcode</label></td><td>[text zip 20/20]</td>
    </tr>
    <tr>
            <td><label>Home Phone</label></td><td>[text phone 20/40]</td>
    </tr>
    <tr>
            <td><label>Email</label></td><td>[email email 20/80]</td>
    </tr>
    <tr>
            <td><label>Mobile Phone</label></td><td>[text mobile 20/40]</td>
    </tr>
</table>
<table>
<tr>
    <td><br><br>What would you like to achieve?</td>
</tr>
<tr>
    <td>[textarea N90000006pBvc 60x3]</td>
</tr>
<tr>
        <td>Please briefly list behaviors</td>
</tr>
<tr>
    <td>
        [textarea N90000006pBvd 60x3]
    </td>
</tr>
<tr><td>[captchac captcha-669]</td></tr>
<tr><td>[captchar captcha-669]</td></tr>
<tr><td><span style="display:none;">[file file-upload]</span></td></tr>
                <td>[submit "submit"]</td>
        <td><input type="hidden" name="lead_source" value="Web"></td>
</tr>
</table>