Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebCodin

    (@webcodin)

    Hi track77,

    Current plugin functionality doesn’t allow to set a default values for fields.

    As custom solution you can try following:
    1) Override necessary template as described in our FAQ section:

    How can I change the form content?
    The plugin includes some templates in “templates/” folder. You can copy any template in your active theme and customize it for your needs. Path to the templates folder inside the active theme:
    [ActiveTheme]/templates/wcp-contact-form/

    For your example it is ./wcp-contact-form/templates/form/email.php.

    2) change in line 21 – value="<?php echo !empty($formData ) ? $formData[$key] : ''; ?>" to value="<?php echo !empty($formData ) ? $formData[$key] : $defaultEmail; ?>"

    $defaultEmail should contain necessary value.

    We hope this information will help you.

    with best regards,
    WordPress WebCodin Team

    Thread Starter Oleksandr

    (@track77)

    It’s great!
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set default value’ is closed to new replies.