Populating contact form fields
-
Hi,
I am trying to have the plugin populate the business form field in contact, just like how it pulls username and email values if the user is logged in.
I’m guessing I should add:
$business = <em>"target string value"</em>once I initialize $business
to class-qsm-contact-manager.phpif ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $name = $current_user->display_name; $email = $current_user->user_email; }and then add
<?php echo esc_attr( $business ); ?>to value=” of<input <?php if ( $contact_disable_autofill ) { echo "autocomplete='off'"; } ?> type='text' class='<?php echo esc_attr( $class ); ?>' name='mlwUserComp' placeholder="<?php echo esc_attr( $options->business_field_text ); ?>" value='' />Since it is not populating the quiz module’s business contact form field with anything, I must be doing something wrong or missed something. I would appreciate it if you could shine some light on this.
The topic ‘Populating contact form fields’ is closed to new replies.