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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

144701 May 17,2019 07:09 PM UTC May 31,2019 06:28 AM UTC ASP.NET MVC - EJ 2 7
loading
Tags: DropDownList
werner mayer
Asked On May 17, 2019 07:09 PM UTC

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,
Like:

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()

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On 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.  
   
[HttpPost] 
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.  
  
Regards,  
Vinoth Kumar S  


werner mayer
Replied On May 21, 2019 07:36 PM UTC

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

Prince Oliver [Syncfusion]
Replied On 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. 

Regards, 
Prince 


werner mayer
Replied On May 24, 2019 02:35 PM UTC

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

My code:

https://codeshare.io/5zkQ3W

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On 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?  
  
Regards,  
Vinoth Kumar S  


werner mayer
Replied On 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.

Christopher Issac Sunder K [Syncfusion]
Replied On 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. 

Thanks,
 
Christo 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon