Select Form Field not Saving Meta


Home Forums Front End PM PRO Select Form Field not Saving Meta

This topic is: Resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30331
    David
    Participant

    Hi,

    I have added a form field as a select input type:

    $currency = array(‘USD’,’EUR’,’GBP’);

    $fields[‘cus_fep_textbox27’] = [
    ‘type’ => ‘select’,
    ‘where’ => ‘reply’,
    ‘options’ => $currency,
    ‘priority’ => 7,
    ];

    add_action( ‘fep_action_message_after_send’, function( $message_id, $message, $new_message ){
    if ( ! empty( $message[‘cus_fep_textbox27’] ) ) {
    fep_add_meta( $message_id, ‘cus_fep_textbox27’, $message[‘cus_fep_textbox27’], true );
    }
    }, 10, 3);

    The field is displayed correctly but the meta is not saving. Am I missing something?

    #30334
    Shamim Hasan
    Keymaster

    Use options as key value pair. eg.

    $currency = array(
    		'USD' => 'USD',
    		'EUR' => 'EUR',
    		'GBP' => 'GBP',
    	);
    
    #30350
    David
    Participant

    Thanks for your help!

Viewing 3 posts - 1 through 3 (of 3 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.