Garima Bansal

Garima Bansal

  • 1.1k
  • 669
  • 38.6k

Enable textbox when another textbox populated

May 28 2024 10:55 AM

I have two textboxes if i insert a value in Landscaping, then Compound Walling gets disabled

<div class="col-md-2"> Enter Value for Landscaping
                                    Html.TextBoxFor(model => model.landscapingsqm, htmlAttributes: new { id = "landscape", class = "form-control", onchange = "onchangeland()" })
                                    Html.ValidationMessageFor(model => model.landscapingsqm, "", new { class = "text-danger" })
                                </div>

<div class="col-md-2"> Enter Value for Compound Walling
                                    Html.TextBoxFor(model => model.compoundwalling, htmlAttributes: new { id = "compoundwall", class = "form-control", onchange = "onchangecompoundwalling()" })
                                    Html.ValidationMessageFor(model => model.compoundwalling, "", new { class = "text-danger" })
                                </div>

 

 


Answers (4)