After hitting submit on my Online Form I want the Form to dissapear and make my Display MediaGallery

Ameya Kulkarni asked on August 17, 2017 21:05

After hitting submit on my Online Form I want the Form to disappear and make my Display MediaGallery webpart visible. How do I achieve that ?

Recent Answers


Peter Mogilnitski answered on August 17, 2017 21:26 (last edited on August 17, 2017 21:53)

You can probably create a custom macro method where you can return System.Web.UI.Page.IsPostBack property and set visibility for media gallery web part based using this custom macro method, but you have to keep in mind that a postback may occur, but for example some fields validation can fail. As far as I understand you want to show media gallery only if form submission was successful. Probably 2 page solution will be better here. 1st page with a biz form and 2nd page with a media gallery and in the biz form settings you can specify "After the form is submitted:" redirect to page (2) with gallery. Both pages can use the same master.

1 votesVote for this answer Mark as a Correct answer

Ameya Kulkarni answered on August 17, 2017 21:59

Is it possible to Show or Hide a web part using Jquery/Javascript in Kentico ? If that is so, I can write a Jquery function tied to the Submit click event of my form.

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on August 17, 2017 22:37

you can show/hide web part on the server side using macros/k#. you can show/hide an element of document(DOM) on a client side using jquery/javascript, but I would not do it on the client side on onsubmit event.
I would add my javascript like in the example below: Image Text If your form correctly submitted the display text will be rendered (you ll see the alert). instead of alert you can do $('#divMedia').toggle() assuming that your media library is wrapped into <div id='divMedia' style='display:none'>...</div>

1 votesVote for this answer Mark as a Correct answer

manuel abraham answered on December 22, 2017 04:39

I had facing this problem but I didn’t get a genuine answer form your blog. I want the correct answer as soon as possible. If possible share the step by step details with us. I am eagerly waiting for your updated post. garage doors in my area Tustin

0 votesVote for this answer Mark as a Correct answer

Vivek Kumar answered on January 16, 2018 08:44

Your question is very interesting, thank you so much for post this. we searched for the very best fun solitaire games just include in our online game collection solitaire games and satisfying to enjoy on your gadget.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.