New message form shortcode autopopulate to specific user


Home Forums Front End PM PRO New message form shortcode autopopulate to specific user

This topic is: Resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13654
    Larry Cottle
    Participant

    1. When using the following, where godzilla is first name and monster is last name;
    [fep_shortcode_new_message_form to=”godzilla monster” subject=”test”]

    the form DOES NOT show.

    2. When using the following where godzilla is first name;
    [fep_shortcode_new_message_form to=”godzilla” subject=”test”]

    the form shows as expected.

    3. When using the following variable, where $first_name = ‘godzilla’;
    [fep_shortcode_new_message_form to=”$first_name” subject=”test”]

    the form DOES NOT show.

    I have tried a variable with various syntax with Zero succcess.

    The only success I have had is #2 above.

    The form shows as expected when using default pre populate.

    What I need is to be able to use a variable for the to=$variable.

    What am i doing wrong?

    LJC

    #13660
    shamim
    Keymaster

    Please see https://www.shamimsplugins.com/docs/front-end-pm/shortcode/fep_shortcode_new_message_form/ for details of this shortcode. “To” argument support user_nicename (Not first name/last name etc).

    Where are you adding this shortcode? In php template or in post editor? post editor can not process php code. To pass variable you have to add this in php template or anywhere where php code can be parsed. If you add in php template let me know full code of this shortcode so that i can correct for you if you have any error.

    #13662
    Larry Cottle
    Participant

    <?php
    Q Where are you adding this shortcode
    A In php template where php code can be parsed
    Heres The CODE:

    $user = ‘godzilla’;
    echo do_shortcode(‘[fep_shortcode_new_message_form to=godzilla subject=”test”]’)
    ?>
    the form shows as expected.

    <?php
    $user = ‘godzilla’;
    echo do_shortcode(‘[fep_shortcode_new_message_form to=$user subject=”test”]’)
    ?>

    the form DOES NOT show.

    LJC

    #13664
    Larry Cottle
    Participant

    Disregard Previous reply as it has an error

    <?php
    Q Where are you adding this shortcode
    A In php template where php code can be parsed
    Heres The CODE:

    echo do_shortcode(‘[fep_shortcode_new_message_form to=godzilla subject=”test”]’)
    ?>
    the form shows as expected.

    <?php
    $user = ‘godzilla’;
    echo do_shortcode(‘[fep_shortcode_new_message_form to=$user subject=”test”]’)
    ?>

    the form DOES NOT show.

    LJC

    #13666
    shamim
    Keymaster

    Please use as echo do_shortcode( '[fep_shortcode_new_message_form to="' . $user . '" subject="test"]' );

    #13670
    Larry Cottle
    Participant

    Thank you! That syntax worked! However the form will no longer populate in my lightbox.

    Any ideas?

    Have A Great Day!

    LJC

    #13677
    shamim
    Keymaster

    I do not see any lightbox code here. Check your syntax with lightbox code.

    #13683
    Larry Cottle
    Participant

    I contacted theme author. They solved the problem. Works great now.

    Thank you!

    LJC

Viewing 8 posts - 1 through 8 (of 8 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.