How would I redirect to a page with a form on it till the user feels out the form? I dont want them accessing any other pages till the form is filled out.
I know this is wrong but something along the lines of this:
$user = elgg_get_logged_in_user_entity();
$field = $user->field;
if(!$field){
forward("form");
}
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.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- adrew22a@drew22a
adrew22a - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- adrew22a@drew22a
adrew22a - 0 likes
You must log in to post replies.Do this in the executing action not form.
And use
instead of
for Elgg 4.
So I have a mandatory form I want them to fill out before the access any other page on the site.
1 - In the form:
Add 'required' => true param to the mandatory field.
2 - In the action:
Check the value for the mandatory field:
3 - Validate the field:
You may want to validate all values in the form before sending them to server (via action).
You can use some libs for this (google it).
Look at this plugin also.
Sorry, I'm looking to not give them access to any other pages until they feel out a form.