WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Make the button editable with ACF (4 posts)

  1. KodeTom
    Member
    Posted 1 year ago #

    Hi,

    I am using Contact Form 7 on a website I'm working on, it is being used as an inquiry form in the sidebar. Now the client would like this form to have the button text (e.g. Request a Quote) editable per page, I do not want to make a different sidebar for every page because that wouldn't be user friendly and there's over 100+ pages.

    I was wondering there must be a way to do this with Advanced Custom Fields as I have managed it with the widget title. Any help/advice will be appreciated.

    http://wordpress.org/extend/plugins/contact-form-7/

  2. KodeTom
    Member
    Posted 1 year ago #

    Just need to find where the plugin echos the button and it's text.

  3. KodeTom
    Member
    Posted 1 year ago #

    You can execute PHP inside the "Edit form" area but not between speech marks. Hmm.

  4. KodeTom
    Member
    Posted 1 year ago #

    For anyone wanting to do this in future here is the solution:

    Go to the contact form 7 directory > modules > submit.php

    Put your ACF field in a variable like so:
    $test = get_field('form_button');

    And then change $atts['value'] = $value; to $atts['value'] = $test;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic