Show modal when first loading a page


#1

Is it currently possible to show a modal when the dashboard initially loads? I’d like to have it display an acceptable use agreement that the user has to agree with to continue to the dashboard.

I currently have a dynamic page set as the default homepage that displays a card with the user agreement. The card has a button that redirects to the main dashboard. I’m probably splitting hairs here but I don’t really like this as much because the redirect reloads the entire page when you click the button instead of just refreshing the contents of the dashboard.


#2

I still haven’t been able to figure out how to load a modal when first loading the dashboard. Is anyone able to point me in the right direction?


#3

I have the same thing running on mine but for another page (not initial home), but the Modal loads everytime the page are loaded.

I used this code at the top of the page, just under the New-UdPage

New-UDRow -Columns {
New-UDColumn -LargeOffset 2 -Endpoint {
Show-UDModal -Header { New-UDHeading -Size 5 -Text “Important Information” } -Content {
New-UDRow -Columns {
New-UDColumn -Endpoint {
New-UDElement -Tag ‘div’ -Content {
New-UDElement -Tag ‘p’ -Content {“First Paragraph.”}
New-UDElement -Tag ‘p’ -Content {“Second Paragraph”}
New-UDElement -Tag ‘td’ -Content {" "}

} New-UDElement -Tag ‘a’ -Content {
(Session:HelpInformation.ksap.docreferences) | ForEach-Object { New-UDLink -Icon external_link -Text .name -Url _.source -OpenInNewWindow -FontColor .color
New-UDParagraph -Text " "
New-UDParagraph -Text $_.details
}
}
}
}
New-UDRow -Columns {
New-UDColumn -Size 2 -Content {
New-UDButton -Color green -Text “Close” -OnClick {
Hide-UDModal
}
}
}
}
}
}