WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Adding Form Element Attributes for SalesForce? (ie. ) (2 posts)

  1. bsegovia
    Member
    Posted 3 years ago #

    Hi,

    I am trying to create a form in WordPress that passes variables to our Salesforce account. Salesforce has a nifty tool that creates an HTML form with the proper form element attributes but now I am trying to get it to display on my website.

    The problem seems to be that WordPress does not seem to like the fully articulated form html when coupled with a different plugin's shortcode. (in my case, [mappress])

    Is there a way to add variable attributes to the different parts of a contact form 7's code? I've included the salesforce form output but used "xxxxx" for sensitive information.

    Thanks!

    <div id="sfcontactcontainer">
    <form id="sfcontactform" action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
    
    <input type=hidden name="oid" value="xxxxx">
    <input type=hidden name="retURL" value="xxxxx.com">
    
    <table width="500" border="0" cellspacing="3" cellpadding="3">
      <tr>
        <td align="right"><label for="first_name" id="contact-first_name">First Name<br />
        </label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /></td>
        <td align="right"><label for="last_name" id="contact-last_name">Last Name</label>
          <br />
          <input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /></td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr>
        <td align="right"><label for="email" id="contact-email">Email<br />
        </label><input  id="email" maxlength="80" name="email" size="20" type="text" /></td>
        <td align="right"><label for="phone" id="contact-phone">Phone<br />
        </label><input  id="phone" maxlength="40" name="phone" size="20" type="text" /></td>
        <td align="right"></td>
      </tr>
      <tr>
        <td align="right"><label for="state" id="contact-state">State/Province<br />
        </label><input  id="state" maxlength="20" name="state" size="20" type="text" /></td>
        <td align="right"><label for="city" id="contact-city">City<br />
        </label><input  id="city" maxlength="40" name="city" size="20" type="text" /></td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr align="right">
      	<td><label for="company" id="contact-company" >Company<br />
      	</label><input  id="company" maxlength="40" name="company" size="37" type="text" /></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="right">Purpose:<select  id="xxxxx" name="xxxxx" title="Purpose"><option value="">--None--</option><option value="Request a Proposal/Consultation">Request a Proposal/Consultation</option>
        <option value="Employment">Employment</option>
        <option value="General Inquiry">General Inquiry</option>
        </select></td>
        <td align="right">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="right">Your Message:
          <textarea  id="xxxxx" name="xxxxx" type="text" wrap="soft"></textarea></td>
        <td align="right"><input type="submit" name="submit"></td>
      </tr>
    </table>
    </form>
    </div>
    </p></div>
  2. alexhager
    Member
    Posted 3 years ago #

    bsegovia, hereĀ“s a tutorial how you can do this:
    how-to-integrate-salesforce-in-contact-form-7

    Do not change the IDs of the fields, Salesforce needs them exactly this way.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic