We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Can't send form while first dropdownlist of the model is filled.

I'm not able to submit my form while the first dropdownlist of the model if filled, i've tested with others dropdownlist in the same position, and the issue always occurs with the first dropdownlist of the model,

If the field "Contract" is filled when i click submit, the screen returns top and focus field "Contract" while contract is empty i'm able to send the data.
Code :
@if (Model.Contracts != null)
@Html.EJS().DropDownListFor(model => model.Ticket.ContractSequentialId).Placeholder("Selecione um termo de compromisso da empresa").DataSource(Model.Contracts).Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Text = "OportunityOmieDescription", Value = "SequentialId" }).CssClass("ddl-ticket").Render()
@Html.ValidationMessageFor(model => model.Ticket.ContractSequentialId, "", new { @class = "text-danger" })
@Html.EJS().Button("btnCreateTicket").Content("Cadastrar chamado").CssClass("btn btn-secondary btn-sm btn-create").Render()

7 Replies

VK Vinoth Kumar Sundara Moorthy Syncfusion Team May 20, 2019 01:44 PM UTC

Hi Werner,  
Thank you for contacting Syncfusion support.  
We have checked your shared code snippet and we found that you binded the datasource using model value and you have not posted the value. So, we suggest you to bind the model value and datasource as like in the below code snippet to resolve this issue.  
public ActionResult Index(Countries model)
       model.ListItems = new Countries().CountriesList();
        model.Value = model.Value;
        return View(model);
Could you please check the above details and get back to us with more information (like complete code snippet or issue replicable sample with video demonstration)? Based on that we will validate and provide you the better solution.  
Vinoth Kumar S  

WM werner mayer May 21, 2019 07:36 PM UTC

Hi, i think you send me the wrong project sample. 

PO Prince Oliver Syncfusion Team May 22, 2019 05:59 AM UTC

Hello Werner,   

Sorry for the inconvenience caused. Please find the proper project in the following link: 

Please check the above example and get back to us if you have any issues in your end. 


WM werner mayer May 24, 2019 02:35 PM UTC

I'm using asp.net.mvc, not core 2.1

My code:


VK Vinoth Kumar Sundara Moorthy Syncfusion Team May 27, 2019 05:41 PM UTC

Hi Werner,  
Good day to you  
We have provided MVC application in our previous update. We have checked our provided sample and we can’t able to reproduce the reported issue at our end. Please check whether you have filled all the value before post. We have prepared the sample based on your provided code and same can be downloaded from below link,  
Could you please check the above sample and get back to us if still issue persists in your end?  
Vinoth Kumar S  

WM werner mayer May 27, 2019 07:17 PM UTC

I solve the problem changin $("form:first").submit(); to   document.forms[0].submit();

But i really don't know what difference it makes.

CI Christopher Issac Sunder K Syncfusion Team May 31, 2019 06:28 AM UTC

Hi Werner, 
Thanks for the update. 
$("form:first").submit(); - $(“form:first”) returns the form element as object collection and first form elements you need to take $(“form:first”)[0].  
document.forms[0] - document.forms[0] returns the form element directly. Because document.forms returns the object collection and document.forms[0] returns the first form element. 
Please get back to us if you require any further assistance. 


Live Chat Icon For mobile
Up arrow icon