I am using tomahawk library for browse button in my project.
Browse button code.
<td><t:inputFileUpload id="file" value="#{sampleService.file}"
valueChangeListener="#{sampleService.file}" /></td>
Radio Button Code
<td><input type="radio" /> This is compulsory</td>
I want to put a validation here,If the user has not checked the radio button,
it should display a message to check radio button.
thanks for any help
Give the radio button a fixed
idand check itscheckedstate in theonclickof the file field and if it’sfalse, then display a message (alert?) and returnfalseto block the browse button.E.g.
You could also wrap it in a JS function:
with