I had created this simple form below, my question is how can i make it required to be filled if not input.
And for the
value how can i make it that IF,
is still not selected, make it also required?
Thanks for looking
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
var form = document.forms.cvapplication;
var output = '<p>Your submission has been accepted</p>';
output += '<p>interests: ' + form.interests.value + '</p>';
output += '<p>state: ' + form.country.value + '</p>';
form.innerHTML = output;
<form name="cvapplication" id="cvapplication">
<p>Input Your Interests</p>
<input type="text" name="interests" id="interests" size="40" style="font-style: oblique" required>
<p>Input Your state</p>
<select size="1" name="country" id="country" style="font-style: italic">
<option value="">- Select -</option>
<option value="US">United States</option>
<input type="button" onclick="submitButton(this.form)" value="Submit" >
Select all Open in new window
I had thought about a creating a Object array to consolidate all statements,But then again wasn't really sure bout the function.., but they way you did it I have never seen it before, and I can see why you did it too, so the statements are a lot shorter...
I see what you did there my friend, very clever
By the way is it just me or it seems connecting XAML to C# or PowerShell is much easier as opposed creating JS..., I guess I'm making a big deal... hey on my defense this is my 3rd day where i'm connecting the 3 JS,CSS,and HTML... :)
Thanks so much!