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

[Solved] Telerik Editor does not work when used inside a form Tag

0 Answers 26 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vivek
Top achievements
Rank 1
vivek asked on 12 Sep 2011, 10:59 PM
Hi,

I have a simple page where users can create an email template.
Currently the Telerik Editor is inside the Html.BegginForm.
In the postback i am able to get the value typed in the Editor.

@using (Html.BeginForm("Create", "Template", FormMethod.Post, new { @class = "ajax-form" }))
{
 <div class="file-contents">
            <div class="editor-label">
                @Html.LabelFor(model => model.Contents)
            </div>
            <div class="editor-field">
                @(Html.Telerik().EditorFor(model => model.Contents)
                                .HtmlAttributes(new { style = "width: 600px; height: 300px;" })
                                .Encode(false)
                                                )
                @Html.ValidationMessageFor(model => model.Contents)
            </div>
      </div>

}

This was done by a programmer who is no longer with the company. I want to use the same look and feel for this form as well. He has used Dojo forms everywhere else. So I updated this form to use dojoform as well.

Here is what i did. When i use this below tech. the post back event does not give me a value in my controller.

<form dojoType="dijit.form.Form" id="createTemplateForm" jsId="createTemplateForm" encType="multipart/form-data" action="@Url.Action("Create", "Template")" method="POST">    
<div class="file-contents">
            <div class="editor-label">
                @Html.LabelFor(model => model.Contents)
            </div>
            <div class="editor-field">
                @(Html.Telerik().EditorFor(model => model.Contents)
                                .HtmlAttributes(new { style = "width: 600px; height: 300px;" })
                                .Encode(false)
                                                )
                @Html.ValidationMessageFor(model => model.Contents)
            </div>
      </div>

</form>

Has anyone seen this problem? Please help me.

Thanks,
Vivek



Tags
Editor
Asked by
vivek
Top achievements
Rank 1
Share this question
or