This is a migrated thread and some comments may be shown as answers.

Views within forms

8 Answers 50 Views
View
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 08 Jul 2014, 03:02 PM
Hi
  Can you explain whats happening here please?

http://trykendoui.telerik.com/eMUf/2

In short I have a web page with a form which holds everything, I want something similar for mobile, a default view and then another one within a form.

Here it just flashes, I assume it's crashing in the background?

thanks

8 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 09 Jul 2014, 10:20 AM
Hi Anthony,

You can initialize the application on the whole form, however in this case you will need to set explicit height of the form container. Please check the following demo:

http://jsbin.com/vumic/1/edit

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Anthony
Top achievements
Rank 1
answered on 09 Jul 2014, 10:42 AM
Thanks for that.

That was a cut down example to show my problem, what I ultimately want to do is have 2 views, each in different forms, and have a mobile tabstrip to navigate between them. Can you do this?

I had a go in the below but I don't know what you would put in as a link
http://trykendoui.telerik.com/ugeQ

thanks

0
Kiril Nikolov
Telerik team
answered on 09 Jul 2014, 11:08 AM
Hi Anthony,

You need to initialize the app on a single container and then the views inside cannot be nested inside forms. In general using the forms approach is not recommended, could you please elaborate a bit more why exactly do you need to wrap the views within forms?

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Anthony
Top achievements
Rank 1
answered on 09 Jul 2014, 11:38 AM
I have come from an Asp.Net background, there you can only have 1 form. I am now working in Asp.Net Mvc where multiple forms are allowed, e.g.

http://stackoverflow.com/a/13644710/220545

It seems useful to have the page split into parts that need to postback (within a view within a form) and those that don't need to (a view not in a form).

If the page was a Single Page Application you could then have multiple views within forms, each view within its own form for posting back just it's own relevant parts 

I'm assuming from your response that Kendo UI mobile can't support multiple forms? So the way forward is to have a single form enclosing all of the views and ignore any extra data that is sent back



0
Anthony
Top achievements
Rank 1
answered on 10 Jul 2014, 06:50 AM
Just to be clear I was asking a question. Is it true that Kendo UI mobile can't support multiple forms and that there are no plans to make it do so?
0
Accepted
Kiril Nikolov
Telerik team
answered on 10 Jul 2014, 10:52 AM
Hi Anthony,

Wrapping Kendo UI Mobile Views in separate form elements is not supported and it is not part of our short term plans. You can wrap the whole application within a form - as I already showed in the previous example.

If you want to have forms within the views and you want to submit these forms to a controller, here is a code-library project that will show you how to do it:

http://www.telerik.com/support/code-library/submitting-forms-with-jquery-ajax

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Anthony
Top achievements
Rank 1
answered on 10 Jul 2014, 11:07 AM
So you can't have views within forms -but- you can have forms within views. That's fine for my purposes :-)

  This is a misunderstanding on my part that I bet a number of former Asp.Net coders will have, I always thought that form was an element which had to be at the top level next to body and you could only have one of them. Its not something I've ever needed to change or worry about.

  In reality a bit of reading shows they can be nested in just about anything.

 Summary: I'm sorted now, thanks for your help

0
Kiril Nikolov
Telerik team
answered on 10 Jul 2014, 11:20 AM
Hi Anthony,

I am glad I helped.

In case you have any further questions, please do not hesitate to contact us.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
View
Asked by
Anthony
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Anthony
Top achievements
Rank 1
Share this question
or