I have a few edit forms, and I have copies of all of them that are modified for mobile viewing. The browse forms are good enough to use in either case.
I would like to be able to redirect the user to the appropriate edit form based on their userid or group. Ie: browseForm.redirectTo = user.group == "mobile users" ? mobileEditForm : desktopEditForm
But I can't find a way of doing this. Is it possible?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
redirect from browse form to edit form dep on userid or grp
-
- Posts: 5
- Joined: Tue May 12, 2015 7:41 pm
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: redirect from browse form to edit form dep on userid or
Hi,
You can do that by implementing your own nuSelectBrowse() function and then open the corresponding form from there.
https://wiki.nubuilder.cloud/ ... lectBrowse
Something like this:
You can do that by implementing your own nuSelectBrowse() function and then open the corresponding form from there.
https://wiki.nubuilder.cloud/ ... lectBrowse
Something like this:
Code: Select all
function nuSelectBrowse(e) {
var r = $('#' + e.target.id).attr('data-nu-primary-key'); // row id
var alc = nuAccessLevelCode();
if (alc == "mobile users") {
nuForm(mobileEditForm, r); // replace with the form id
} else {
nuForm(desktopEditForm, r); // replace with the form id or use nuGetProperty('form_id');
}
}
-
- Posts: 5
- Joined: Tue May 12, 2015 7:41 pm