Skip to content

How to add additional fields after signed-up by third party services? #462

@juliomac

Description

@juliomac

On my accounts-password signup, I pretty much could add all extra information for payment I want, but when the user signs-up via Facebook, for instance, it logs without ever asking to fill in these extra fields.

I have added fields to atForm using template, such as on the example below:

 AccountsTemplates.addField({
    _id: 'CardName',
    type: 'text',
    required: true,
    re: /[a-zA-Z\ÁÉÍÓÚÝÂÊÎÔÛÀÈÌÒÙÄËÏÖÜŸÇÃÑÕáéíóúýâêîôûàèìòùäëïöüÿçãñõŒœßØøÅ寿ÞþÐð\s\']{3,}/,
    template: 'GuestCardName'
});

With template:

<template name="GuestCardName">
<div class="form-group">
    <label for="at-field-{{_id}}">Nome no Cartão</label>
    <!-- Pattern of Last name contains \s to allow more than one surname-->
    <input type="text" class="form-control validcolored" id="at-field-{{_id}}" name="at-field-{{_id}}"
    value="julio">
</div>

What is the best strategy?

I though on letting the user logs in with 3rd party service then, when needed, ask to complete with a second payment information form.
Negative: It is not an elegant solution: I can't re-use the templates because of the id="at-field-{{_id}}" that I have to have on addField. Is another a way to re-use it?

An alternative approach would be to have two Signup forms structure (#358), the second only with the missing fields and meld it all up with splendido/meteor-accounts-meld . Think it is a waaay to wild alternative.

As a suggestion, a possible feature for the package would be to have a form state="completeProfile". We could have it in our configuration set as true and add fields only to it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions