XF 2.0 Add password field in register_connected_account template

Solooo

Member
I want to require user to register with Facebook account. But in my country, sometimes Facebook is blocked.
I've try to add password field register_connected_account template so that user can login by Username or Facebook:

I added
Code:
            <xf:comment>Spam catcher field</xf:comment>
            <xf:if is="{{ rand(0, 2) == 1 }}">
                <xf:textboxrow name="password" type="password" autocomplete="off" rowclass="formRow--limited"
                    label="{{ phrase('password') }}"
                    explain="{{ phrase('please_leave_this_field_blank') }}" />
            </xf:if>

            <xf:textboxrow name="{{ $regForm.getFieldName('password') }}" type="password" autocomplete="off"
                label="{{ phrase('password') }}" />
before:
Code:
                    <xf:if is="!$providerData.dob">
                        <xf:macro template="register_macros" name="dob_row" />
                    </xf:if>

and this is my error:
Template errors
  • Template public:register_connected_account: Cannot call method getFieldName on a non-object (NULL) (src/XF/Template/Templater.php:907
Please help me,
Thanks so much!
 
Providing a password here would require an add-on as it's explicitly designed not to take one when registering using a connected account.

If the user can't access Facebook, they'll never even get to this point anyway. What you want is really just a normal registration.
 
Top Bottom