Filter question for fep_form_fields message_to


Home Forums Front End PM PRO Filter question for fep_form_fields message_to

This topic is: Resolved
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #40226
    little.chimp
    Participant

    Why doesn’t this have any effect on the message to placeholder and label in the new message section?

    add_filter( 'fep_form_fields', function( $fields ){
        $fields['message_to']['placeholder'] = '';
        $fields['message_to']['label'] = '';
        return $fields;
    });
    #40254
    Shamim Hasan
    Keymaster

    Can you give me a screenshot what it is showing now?

    #40256
    little.chimp
    Participant

    Yep, screenshot attached. I’m hiding the labels with CSS at the moment, but everything in the fep_form_fields filter works apart from the message_to elements.

    Attachments:
    You must be logged in to view attached files.
    #40266
    Shamim Hasan
    Keymaster

    You are right, message_to elements has some other limitation. There are couple of other feature involved there (eg. multiple recipients, send to admin, send to group), so technically it is not one field but couple of field combined. Thats why it is not working there. But i will try to improve there in next version so that we can change placeholder, label there.

    #40287
    little.chimp
    Participant

    So, as a work around?

    function message_to_placeholder_replace($output) {
    	if (is_page('messages')) {
    		$replace = array('#placeholder="Name of the recipient."#');
    		$string = 'placeholder="To"';
    		$output = preg_replace($replace, $string, $output, 1);
    		return $output;
    	}
    }
    function start_message_to_placeholder_replace() { 
    	ob_start("message_to_placeholder_replace"); 
    }
    add_action('wp_head','start_message_to_placeholder_replace');
    #40304
    Shamim Hasan
    Keymaster

    Can you wait 1-2 weeks for this? I have already added the code so that it respect label and placeholder. In next version you will get it.

    #40310
    little.chimp
    Participant

    Much appreciated. I’ll just comment out my customisations once you push the update. 🙂

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