kjac / FormEditor

A form builder editor for Umbraco 7 - let your editors build forms easily with this free package.
MIT License
99 stars 42 forks source link

Validation not fired while submit the Form. #121

Closed RPanc closed 7 years ago

RPanc commented 7 years ago

Hello, I have installed latest version of form editor in umbraco site. I want to reuse the form that's why i use Following code. @{ var formContent = CRMHelper.GetNodeById(Convert.ToInt32(slides[i].id)); ViewBag.FormContent = formContent; } @Html.Partial("FormEditor/NoScript", Umbraco.AssignedContentItem)

Validation doesn't fired when click on submit button. here its working Fine here its not working

both are same form but one have master page one doesn't have master page.

I don't know what i m missing. Any help would be appreciated.

Thanks, Ronak Panchal

kjac commented 7 years ago

Hi Ronak. I'll have a look at it this weekend, hopefully tomorrow.

Den 31. mar. 2017 2.40 PM skrev "RPanc" notifications@github.com:

Hello, I have installed latest version of form editor in umbraco site. I want to reuse the form that's why i use Following code. @{ var formContent = CRMHelper.GetNodeById(Convert.ToInt32(slides[i].id)); ViewBag.FormContent = formContent; } @Html.Partial("FormEditor/NoScript", Umbraco.AssignedContentItem)

Validation doesn't fired when click on submit button. here its working Fine http://beta-client.brnd.com/c/formularer/test1/ here its not working http://beta-client.brnd.com/standardside-med-formular/

both are same form but one have master page one doesn't have master page.

I don't know what i m missing. Any help would be appreciated.

Thanks, Ronak Panchal

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kjac/FormEditor/issues/121, or mute the thread https://github.com/notifications/unsubscribe-auth/AHD_CpbgAQ6Wdr3rrUSRNeqe3183HJSQks5rrPQVgaJpZM4Mvnba .

kjac commented 7 years ago

Hey @RPanc,

It looks like your site JS overrules the native form validation - possibly an issue with Angular. If I turn off JS on the site, the native form validation is triggered.

Since you've already got Angular in play, maybe you should consider using the async rendereing?

RPanc commented 7 years ago

Hello @kjac , I need to reuse the form in umbraco grid. for that i just crated one grid editor named form picker. after that i just render form as below. `@using System.Web.Mvc.Html @inherits Umbraco.Web.Mvc.UmbracoViewPage @{ var slides = Model.value.spots; int total = slides.Count; }

@for (int i = 0; i < Convert.ToInt32(slides.Count); i++) { var formContent = CRMHelper.GetNodeById(Convert.ToInt32(slides[i].id)); ViewBag.FormContent = formContent; @Html.Partial("FormEditor/NoScript", Umbraco.AssignedContentItem) } `

But its not working anything that i m missing in that. Thanks, Ronak Panchal

kjac commented 7 years ago

It looks like the form renders just fine, and I'm guessing it saves valid form submissions as well, so you're not really missing anything. You just need to figure out what's overruling the native (HTML5) form validation... or use another rendering method, for example the async one as I mentioned above.

You might also want to have a look at this tutorial for a complete example of rendering a form within the grid.

RPanc commented 7 years ago

Hello @kjac yes I solved that. One more thing unable to upload multiple files and send that files to Email. Thanks, Ronak Panchal.

kjac commented 7 years ago

Hi @RPanc,

The built-in upload field doesn't support multiple files. If you need multiple file uploads, you'll either need to add multiple upload fields or alternatively create your own field type to handle it.

kjac commented 7 years ago

I'm closing this now, feel free to reopen if the issue hasn't been resolved.