Skip to content

Instantly share code, notes, and snippets.

@alundiak
Last active Dec 17, 2015
Embed
What would you like to do?
digital-javascript
<form id="myForm" name="myForm" enctype="multipart/form-data" method="POST"
data-bind="submit: pseudoSubmitForm">
<select data-bind="options: uiTypes,
optionsText: 'typeLabel',
optionsValue: 'typeValue',
value: selectedType,
optionsCaption: 'Choose...'">
</select>
<div id="file1" data-bind="visible: showField1">
<p>Select file 1</p>
<input type="file" name="files" data-bind="value: valueField1"/>
</div>
<div id="file2" data-bind="visible: showField2">
<p>Select file 2</p>
<input type="file" name="files" data-bind="value: valueField2"/>
</div>
<input type="submit" value="Execute" data-bind="enable: enableExecutionButton() "/>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment