Im trying to code something in my plugin develop.
There's different fields in user profile, for example "email" address field. Which user can enter their email address; what if user got more than 1 email address?
I would like to have a button let the user to click "Add more email" button and come up with new fields which user can enter their 2nd email address+2nd phone number+etc.
Not sure if elgg already has its own function defined or if there's any examples?
please help...thx alot guys
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Beside hardcode on the page with a action fuction elgg_view_form etc...
anyother idea?
You need to use JS to create new form inputs, and then override the profile/edit action to allow multiple values for these fields.
Thx Brett,
how about just use elgg_view_form to define the "Add more field" action in the profile/edit action page?
wuts the difference? I mean...js will be faster? or easier for maintance?
pls advise,
thx guys
Actions should never output anything. If you don't want to use JS, you can change the form to always show a new, empty email field, and then change the action to accept email input as an array.
Thank you Brett...
I have made a new website based on elgg http://berojgar.in
I havenot got any perfect chat plugin for it.pls help