Hi,
We want to put a profile2 checkbox field at the user register page and at the edit account page. We have try to put the basic checkbox field at the drupal profile account and show it on the drupalgap display option, but on drupalgap it only show the label of the field.
We have created a register form like this:
form.elements.name ={
type: 'textfield',
title: 'Username',
};
form.elements.mail ={
type: 'textfield',
title: 'Mail',
};
form.elements.pass ={
type: 'password',
title: 'Password',
};
form.elements.field_carnets ={}
But the page shows the message "undefined" whith the last line. Without the last line ( form.elements.field_carnets ={} ) the form works well.
Any idea to solve it?
Thank you!
Comments
Comment #1
tyler.frankenstein commentedThe reason it is undefined, is because the element you're placing on the form is empty:
form.elements.field_carnets ={}Take a look at the forms documentation to learn how to add elements to the form:
http://drupalgap.org/node/274
Or better yet, contribute to the development of the Profile2 module for DrupalGap so it will just work automatically for everybody ;)
Comment #2
sorek commentedOk, I'll try to do with the profile of drupal, it is the first time I work with does not even drupalgap and how everything works.
Later it proves to do with profile2 and if I get something I will comment you.
Thanks :)