Page 1 of 1

User notices popup

Posted: Fri Aug 21, 2020 10:31 am
by MLeggy
Morning,

Within my little time sheet application I am wanting to display notifications to the users on the first screen after they have logged in.

I have added a run object on the first Launch screen that displays an iFrame containing the form listing all the notifications, this works fine.
Pic1.jpg
The issue comes when you want to view the notifications
Pic2.jpg
I don't want users to edit them so how do i get it to either show the edit form which expands the text in a textarea or have some form of pop out with the message.

Any help would be appreciate.

Re: User notices popup

Posted: Fri Aug 21, 2020 10:55 am
by kev1n
Hi,

Adding this code to the embedded form will prevent the user from opening the record in the edit screen.

Code: Select all

function nuSelectBrowse(e) {
  //  do nothing
}
But you could also redirect the user to another form that shows just one textarea containing the notifacation.
So you would have to create a simple new form with one textarea. Then replace form_id in the code below with the newly created Form Id.

Code: Select all

function nuSelectBrowse(e) {
    var pk = $('#' + e.target.id).attr('data-nu-primary-key');
    if (pk !== undefined) {
            nuForm('form_id', pk, '', '', 1); 
    }
    return false;
}
Hope that helps...

Re: User notices popup

Posted: Sun Aug 30, 2020 6:45 am
by kev1n
MLeggy,

Could you try my code?