Value of the UserRegistration submit button should be translatable

Issue #3 resolved
pwFoo repo owner created an issue

Hi,

I'm trying to override the "Send email validation code" value of the UserRegistration submit button, I need it to be translatable.

Since I don't want to hack the module (line 157 of FrontendUserRegisterEmailValidation.module) by putting a _('Send email validation code'), I tried to set the custom value with a

$fu->addHookBefore('render',function($event){
        $form = wire('fu')->form;
        if (!wire('session')->get('registerStep')) {
            $form->fhSubmitBtn->value = __('My custom text',$langfile);
        }
    });

but to no avail -- it seems that the module's hook function ( hookRegisterFormBeforeRender ), which also will hook into before render, always trumps "my" value.

What am I missing?

thx

Tom

Comments (1)

  1. Log in to comment