[Forminator] Alternative way to input prefix

The default prefixes are in English. Chaning them to German prefixes requires installing language files.

Is there an easier method with Forminator?

It would be nice to have a more universal way for typing a prefix, for example to make it a text input field rather than a dropdown with the defined prefixes.

  • Adam
    • Support Gorilla

    Hi Vlad

    I hope you’re well today and thank you for your question!

    Currently these prefixes are “fixed” and can’t be directly edited but I agree – it would be quite handy to be able to edit/customize them right in the field settings.

    I’ve already talked to our developers and we’ve just put it on our improvements “to do” list. They’ll look into it to make it possible to customize pre-defined prefixes and add new ones directly from the plugin in future.

    As for now, there’s a workaround that could work for you. It would require adding a small piece of code to the site:

    <?php 
    
    function wpmu_forminator_customize_name_prefixes( $prefixes ) {
    	
    	/* customize existing prefixes; default are
    	
    			'Mr'   => __( 'Mr.', Forminator::DOMAIN ),
    			'Mrs'  => __( 'Mrs.', Forminator::DOMAIN ),
    			'Ms'   => __( 'Ms.', Forminator::DOMAIN ),
    			'Miss' => __( 'Miss', Forminator::DOMAIN ),
    			'Dr'   => __( 'Dr.', Forminator::DOMAIN ),
    			'Prof' => __( 'Prof.', Forminator::DOMAIN ),
    	
    	*/
    	
    	$prefixes['Mr'] = 'Herr';
    	
    	/* add new one */
    	$prefixes['Abc'] = 'ABC.';
    	$prefixes['Xyz'] = 'XYZ';
    	
    	
    	return $prefixes;
    	
    }
    
    add_action( 'forminator_name_prefixes', 'wpmu_forminator_customize_name_prefixes', 10, 1 );

    You would want to edit the code slightly. In the code above I’ve changed one of prefixes (“Mr” to “Herr”:wink: and I’ve added my own two. Feel free to remove those two lines which are adding two new prefixes or edit them and follow the example of the “Mr’ to “Herr” change to customize other prefixes.

    To add the code to the site:

    – create an empty file with a .php extension (e.g. “forminator-customize-name-prefixes.php”:wink:
    – copy and paste my code there
    – make necessary adjustments
    – upload the file to the “/wp-content/mu-plugins” folder of your site’s WP installation, via FTP or cPanel “File Manager”; if there’s no “/mu-plugins” folder right in “wp-content”, just create an empty one first.

    Best regards,
    Adam

  • Vlad
    • Design Lord, Child of Thor

    Thx. I’ll test it right away.

    While we’re at it, here is a funny one for the Devs (not sure how it looks in other Countries): If you put all those fields:
    ‘Mr’ => __( ‘Mr.’, Forminator::smiley:OMAIN ),
    ‘Mrs’ => __( ‘Mrs.’, Forminator::smiley:OMAIN ),
    ‘Ms’ => __( ‘Ms.’, Forminator::smiley:OMAIN ),
    ‘Miss’ => __( ‘Miss’, Forminator::smiley:OMAIN ),
    ‘Dr’ => __( ‘Dr.’, Forminator::smiley:OMAIN ),
    ‘Prof’ => __( ‘Prof.’, Forminator::smiley:OMAIN ),
    You are missing some other facts:
    1. Prefixes must be Multiple Choice, as you can have Ms. Prof. Dr. Joana Doe :grinning:slight_smile:). Currently is single choice, unless I somehow missed smth. Consider the order of Prefixes too. U can t have Dr. Ms. Prof. :grin:.
    2. Ppl. r gonna laugh about this one, though considering the background it s not funny at all. Recent EU Laws FORCE us to use DIVERS as a gender (as far as I can remember in accordance to the EU Gay Rights Legislation). I guess this one is somehow fixed by the solution to my previous issue. It would be nice (and maybe even required) that Forminator covers this topic in General for all Forms, not just Registration. So if the prefix is fixed, the next update, if you guys consider it necessary and validate my suggestion, should include apart from Mr., Ms, and so on also Divers as a prefix. That depends of the approach u guys will take: add custom field or keep the options (allow to remove unnecessary options). Maybe swith Dr. and Prof. to a custom TITLE Field?!

    I personally have never seen a customer use Divers Prof. Dr. on an application form or site registration ::joy: but still, as in the case of the Cookie Policy, if the MAN says u have to have it, well we kinda have to have it:sweat_smile:. Plus it s a Human Right concern, and shows respect and consideration toward all your customers no matter of “gender”.

  • Adam
    • Support Gorilla

    Hi Vlad

    I’m by no means a lawyer or a legal specialist of any kind so I’ll take the liberty of not addressing that part of your post if it comes to “law aspects”. I hope that’s fine.

    Let me confirm, though, that the way we got that improvement described on our “to do” list is to provide ways to:

    – customize pre-defined prefixes
    – remove pre-defined prefixes (all or just some)
    – and add any number of custom ones

    I’d say that would solve any “required by law” requirements as you could simply add any prefixes that you consider necessary – regardless whether required by law or because they suit the site idea more :slight_smile:

    As for multiple-choice and changing order: yeah, I think that’s a good point. I’ve already passed that over to our developers too as a future improvement idea

    Best regards,
    Adam

  • Vlad
    • Design Lord, Child of Thor

    Hi Adam. Thx. for the fast reply.

    Yes, I agree that all those legal aspects should be left alone, as this is not a legal forum. Nonetheless, as Forminator is a plugin used not only in an EN environment, I personally consider that making these modifications are a plus for the value of the plugin. Plus, I need them for my projects :sweat_smile:
    Just in case u got some time for some light reading, here is a post (I am not advertising these guys) with regard to adding a 3rd gender DIVERS to the registration form (in case u want to and see any marketing value in this). The post is in German, and mentions only checkout forms, but then again, if u put in the registration Mr. u can t have the customer chose at checkout Divers :joy: ; but u can use some browser translation add on tool: https://www.onlinehaendler-news.de/e-recht/rechtsfragen/32701-wir-wurden-gefragt-dritte-geschlecht-bestellformularen

    I actually got another issue to address the Devs. Forminator has in the default Registration form an Activation Email which is more like a Welcome Mail. That one is AS IS a big no no. I tested several times, and you can actually check my last live chat. It might be a site issue, localized just within my install, so please run some tests, as this is very important. That activation mail the customer/user/subscriber receives upon activation is sent BEFORE any email confirmation is received and submitted by user. That could be considered a form of marketing / breach of personal privacy or whatever. It s like getting a newsletter without email confirmation that you want to receive the newsletter. And I say this even with that check box for Privacy Policy.

    In my opinion the order should be: Form submission/ Email Confirmation=Account activation/Welcome mail (that would be the Email Forminator sends first).

    Sure, you can deactivate it, but then again, why have it then? Cuz you can t use it in EU. And even if outside the EU, if you use it in a shop, that complicates the registration process and makes the customer getting bored. In my opinion it s also a pointless step. It s like that episode of Futurama where Central Bureaucracy sends out mail and says: dear bureaucrat nr 23, your are about to receive mail from the Central Bureaucracy :joy: Sure you want the customer to feel welcomed, but…you actually want him to get back on your site and buy stuff :joy:

    Now, is it possible to include the activation link in this email? Currently I can t see an option.
    If yes, then the second email with the activation code must be stopped.
    If not, how do you customize the actual activation email (the one forminator send with the activation link)?

    There might be another issue also with the confirmation email of the activation: it includes the registration password. That might be a security issue. It would be nice if we could do smth about this. Like replace it with: Your chosen password. If you use a plugin that logs all email from your site, and email content, and ur site get s hacked, then joy for the cracker, cuz the cracker has the passwords too :joy: And because ppl use the same password in combination with the email oh so often, imagine the liability on that one.

    Let me know if you get different results, and I look forward to your input. Cheers

  • Adam
    • Support Gorilla

    Hi Vlad

    Thanks for response and sharing that link, quite an interesting reading indeed!

    I can see the point in the case of those e-mail too but I’d like to ask you for something, if I may. Could you please actually start a separate thread about that?

    I realize that it’s related in that sense, that it’s partially a consequence of the law, but it’s a different aspect of the plugin and, technically speaking, completely different issue. We always ask to keep not strictly-related issues separate as it helps us follow the discussion and stay on top of information and also better (faster) handle the case.

    I know it means “repeating yourself” but I’d appreciate it a lot :slight_smile:

    Best regards,
    Adam