vendredi 4 janvier 2019

Mark Checkbox if text box has text

I have a checkboxfor and a textboxfor. If a user enters text into the textboxfor I would like the corresponding checkboxfor to be automatically checked for the user. With the option of course to un-check it if they change their mind.

@Html.CheckBoxFor(m => m.FirstPledge)
@Html.TextBoxFor(m => m.FirstPledgeText, new { @class = "textBoxSize" })




Aucun commentaire:

Enregistrer un commentaire