What do you mean by "triggered?"
when you mark an input field as required Elgg sets the HTML5 attribute 'required' for more information have a look at http://www.html5tutorial.info/html5-required.php.
No JS is used in making sure the field is required, it's all handled by the browser internally.
...as for the code you posted, it looks right. Maybe check for a typo...
how do I get the same array of ElggEntities from ElggBatch similar to results from executing elgg_get_entities? Do I use a for loop to create an array of ElggEntities?
Just use elgg_get_entities(). That's what ElggBatch does anyway.
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.