Ability to submit if the tag is DIV

1 Answer 45 Views
Form
Aleksandr
Top achievements
Rank 1
Bronze
Iron
Veteran
Aleksandr asked on 09 Jan 2023, 02:29 AM

seems just work perfectly if the tag is FORM, if div, submit will not be fired, would be great to have one of two options:

1 - use div tag (all works well except submit)

2 - give the ability to get a model from the form, like when submitting (e.model), form.model or form.model(), now have to form._model & get to string & back to json to be able to post

P.S some time we cant use form tag to do not have it nested

 

 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 11 Jan 2023, 12:59 PM

Hi Aleksandr,

1. As mentioned in the documentation, the Form should be initialized from '<form>' element

- https://docs.telerik.com/kendo-ui/controls/layout/form/overview#initializing-the-form

2. When a Form is submitted you can get the submitted model in the submit event handler:

https://docs.telerik.com/kendo-ui/api/javascript/ui/form/events/submit

submit: function(ev) {
            console.log(ev.model);
}

Let me know in case you have any additional question on the matter.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Aleksandr
Top achievements
Rank 1
Bronze
Iron
Veteran
commented on 11 Jan 2023, 04:05 PM

Hello Neli,

thx a lot for your reply, I know how it has to work according to the documentation, but such a design significantly limits the possible usages, for example, if we work with old asp.net forms the asp.net creates the main parent form and all the controls are inside it, unfortunately, Telerik forms control does not work when the form tag is nested (what is correct), that is why i have switched to div & found a workaround to make it work, but having it out of the box would be preferable, please take my post as a future request, it does not require too much work & will make forms control more robust

Thx Alex

 

Neli
Telerik team
commented on 16 Jan 2023, 11:19 AM

Hi Aleksandr,

Thank you for the feedback. I logged a Feature Request on your behalf and below you will find a link to the item in our Feedback Portal:

- https://feedback.telerik.com/kendo-jquery-ui/1593750-ability-to-submit-form-if-the-tag-is-div

We will keep monitoring the community's interest in the issue.

Regards,

Neli

Aleksandr
Top achievements
Rank 1
Bronze
Iron
Veteran
commented on 16 Jan 2023, 02:32 PM

Neli,

thx a lot

 

Thx Alex

 

 

Tags
Form
Asked by
Aleksandr
Top achievements
Rank 1
Bronze
Iron
Veteran
Answers by
Neli
Telerik team
Share this question
or