• Resolved mrcairney

    (@mrcairney)


    Hi, I’d like to add a form title to the <form> area (Something like “Get in Touch”)

    I think I need to use the salesforce_w2l_form_html filter to customise the form’s HTML but I’m unsure on the syntax.

    Can anyone point me in the right direction so I can add <h3>Get in Touch</h3> at the top of the <form>?

    Also, there might be a case where I would need slightly different working on a different form, can the filter help with that, and if so an example of syntax would be great.

    https://wordpress.org/plugins/salesforce-wordpress-to-lead/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mrcairney

    (@mrcairney)

    I decided to use an HTML field in the form and style it up using
    .salesforce_w2l_lead .w2llabel.html {}

    Does the job!

    Plugin Author Nick Ciske

    (@nickciske)

    Options

    1. Just use the post editor? 😉

    Form Title
    [salesforce form=”X”]

    2. The filter route would only work in v3 (not released yet, but you could grab the development version off GitHub — please test on a development server and have a backup of your production site before using, as it does migrate all form data to CPTs!).

    https://github.com/cimburadotcom/salesforce-wordpress-to-lead/tree/ver3

    add_filter( 'salesforce_w2l_form_html' ,'salesforce_w2l_form_html_add_title', 10, 5 );
    
    function salesforce_w2l_form_html_add_title( $content, $form_options, $is_sidebar, $form_id, $version ){
    
    		return '<h2>'.get_the_title( $form_id ).'</h2>' . $content;
    
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Editing for HTML with salesforce_w2l_form_html’ is closed to new replies.