sure! merci pour votre réponse
a bit of context: the users of the forum must input their company (empresa, in portuguese) and this info must be shown at their user card
in js/src/forum/index.ts:
extend(SignUpModal.prototype, 'fields', function(items) {
items.add('Empresa',
m('.Form-group', [
m('input.FormControl', {
name: 'empresa',
type: 'text',
id: 'empresa',
placeholder: 'Empresa',
})
]),
);
});
extend(SignUpModal.prototype, 'submitData', function (data) {
data.empresa = this.empresa();
})
extend(UserCard.prototype, 'infoItems', function(items) {
items.add('display-empresa', m("p", "Empresa: ????????? ")
}
The "??????" should actually bear the value stored in the "Empresa" field. I know I should add a column in the forum's database with PHP, but I'm not knowing exactly how to do this (or even if it's really needed).
The code I inserted in submitData
stems from the Nicknames extension source code, but the browser returns to me that "empresa" is not a function (it really isn't) and I don't know where exactly to define it.