ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to hide OK Button on PopupForm
Title:
B
I
{code}
?
Hi O! I initialize a popup form with Html.Awe.InitPopupForm using .OKText and .CancelText. In some situations (e.g. permission check) I have to show a popup form only with "Cancel" button ("OKButton" has to be hidden/invisible) Is there any Mod to achive this?
Save Changes
Cancel
TT Tom
asked at 28 Mar 2018
Answers
B
I
{code}
?
you can set `.UseDefaultButtons(false)` and add the cancel button manually using `.Button(text, click)` as shown in the popuup demo https://demo.aspnetawesome.com/PopupDemo#Buttons
Save Changes
Cancel
Omu
answered at 28 Mar 2018
Can I access popupForm object after initialization? e.g Html.Awe().InitPopupForm().Name("Sample1") something like this: Html.Awe().PopUpForm("Sample1").Button(text,click)
at 28 Mar 2018
TT Tom
of course you can, just like any other helper/object
at 28 Mar 2018
Omu
Thanks, but what is the proper way to access this object? There is no PopUpForm getter on Awe.
at 28 Mar 2018
TT Tom
@{ var pf = Html.Awe().InitPopupForm().Name("Sample"); if(true) pf.Button("text", "click"); } @pf
at 28 Mar 2018
Omu
Great, Thank you!
at 28 Mar 2018
TT Tom
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK