• Resolved carcayu80

    (@carcayu80)


    It seems theres something similar to a bug in the Appearance section.

    “Radio and Checkbox” part is what is used to define the consent part.

    BUT it only shows that part in the appearance section if any radio/checkbox fields are active, not if consent field is active.

    So, if I want to customize a consent field, I have to add a radio/checkbox field, then the “radio and checkbox” part will be shown in the consent section, define it and finally delete the radio/checkbox field.

    On the other side, is there any way to define the first column day in the calendar pop up? I mean, sunday instead of monday for american users.

    Thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @carcayu80 ,

    This is a known bug and Forminator team is working on fixing it. But we don’t have ETA yet.

    On the other side, is there any way to define the first column day in the calendar pop up? I mean, sunday instead of monday for american users.

    This is controlled by WordPress Settings, please see screenshot:

    https://monosnap.com/file/Z73RC3bxg8b5os68qmGv49HqAolv8P

    kind regards,
    Kasia

    Thread Starter carcayu80

    (@carcayu80)

    Thanks! Just another question. We have both american and non american but english speaking clients. It is important to be clear things like the start date of a trip, for example.

    We use visual calendar to pick the day, but that date must be written like a text when sending e-mail confirmation, obviously.

    If a use datepicker
    Label > Calendar
    and then
    Label> Date format,

    Only formats like “d-m-Y, d/m/Y”, etc are available. I mean, only numbers

    Is there any way to specify a date format in e-mail confirmation like “January 4, 2023” (F j, Y)?

    So there will be no doubt if the firt is the month or the day of the start date.

    Thanks in advance

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @carcayu80,

    There isn’t an out of the box setting in the plugin side, but you could try this custom snippet and see whether it helps:

    <?php
    
    add_filter( 'forminator_custom_form_mail_admin_message', 'wpmudev_show_formatted_date', 10, 5 );
    function wpmudev_show_formatted_date( $message, $custom_form, $data, $entry, $cls ) {
      	if ( $custom_form->id == 1189 ) { //Please change the form ID here
    		preg_match_all('/\d{2}\/\d{2}\/\d{4}/', $message, $matches);
    		foreach ( $matches as $date ) {
    			if ( ! empty( $date ) ) {
    				foreach ( $date as $key => $val ) {
    					$message = str_replace( $val, date( 'F j, Y', strtotime( $val ) ), $message ) ;
    				} 
    			}
    		}
    	}
    	return $message;
    }

    You’ll have to replace the number 1189 in the above code with your form ID to get the snippet to work.

    Suppose the form ID is 123 the the line will change to:

    if ( $custom_form->id == 123 ) { 
    

    I gave a quick test and can confirm the above code work. You can apply the above code as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:

    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Please do let us know how that goes.

    Best Regards,

    Nithin

    Thread Starter carcayu80

    (@carcayu80)

    Thanks a lot. It works like a charm.

    In case I’d like to change it for all forms, I’ve just to delete the “if” sentence, is that right? I mean:

    <?php
    
    add_filter( 'forminator_custom_form_mail_admin_message', 'wpmudev_show_formatted_date', 10, 5 );
    function wpmudev_show_formatted_date( $message, $custom_form, $data, $entry, $cls ) {
    		preg_match_all('/\d{2}\/\d{2}\/\d{4}/', $message, $matches);
    		foreach ( $matches as $date ) {
    			if ( ! empty( $date ) ) {
    				foreach ( $date as $key => $val ) {
    					$message = str_replace( $val, date( 'F j, Y', strtotime( $val ) ), $message ) ;
    				} 
    			}
    		}
    	return $message;
    }


    Thread Starter carcayu80

    (@carcayu80)

    Sorry, one more thing: It seems it doesnt change the date in the subject. I mean, also in “e-mail notification” -> “Subject” I add the {date-1} code

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @carcayu80

    I pinged our SLS Team to review your query and see can we make some updates in this snippet so it could support SUBJECT part as well. We will post an update here as soon as more information is available.

    Kind Regards,
    Kris

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi again @carcayu80

    You will need a separate snippet as mu-plugin in this case:

    add_filter( 'forminator_custom_form_mail_admin_subject', 'wpmudev_show_formatted_date_subj', 10, 5 );
     function wpmudev_show_formatted_date_subj( $subject, $custom_form, $data, $entry, $cls ) {
           if ( $custom_form->id == 1189 ) { //Please change the form ID here
             preg_match_all('/\d{2}\/\d{2}\/\d{4}/', $subject, $matches);
             foreach ( $matches as $date ) {
                 if ( ! empty( $date ) ) {
                     foreach ( $date as $key => $val ) {
                         $subject = str_replace( $val, date( 'F j, Y', strtotime( $val ) ), $subject ) ;
                     } 
                 }
             }
         }
         return $subject;
     }

    As mentioned above it should be followed by this guide + change the ID of form
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Kind Regards,
    Kris

    Thread Starter carcayu80

    (@carcayu80)

    Sorry, brand new father, not enough time to answer before.

    Thanks a lot, It works perfect. Its incredible the support you give, keeping in mind it is a free plugin. Indeed, best support even than other paid plugins

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Bug and question’ is closed to new replies.