Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Commit

Permalink
Wire up functionality on form
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Maier committed Jan 3, 2017
1 parent fd46451 commit 1d3d51e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions _pages/claims/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ <h1>How it works</h1>
// When the schema and form are available, render the form
$.when(json_schema, json_form).done(function() {
JSONForm.fieldTypes['title'] = {
template: '<h2><%=node.value%></h2>'
template: '<h2><%=node.value %></h2>'
};
JSONForm.fieldTypes['section-title'] = {
template: '<h3><%=node.value%></h3>'
template: '<h3><%=node.value %></h3>'
};
JSONForm.fieldTypes['instructions'] = {
template: '<p class="instructions"><%=node.value%></p>'
Expand All @@ -66,8 +66,12 @@ <h1>How it works</h1>
.on("change", 'select[name="information.reason"]', function(){
if ($(this).val() == "Manage a recently diagnosed medical condition.") {
$('.dependent').hide();
$($('h2')[3]).hide();
$($('h3')[3]).hide();
} else {
$('.dependent').show();
$($('h2')[3]).show();
$($('h3')[3]).show();
}
})
.on("change", 'input[name="payment.method"]', function(){
Expand Down
1 change: 1 addition & 0 deletions javascripts/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
},
{
"type": "section-title",
"htmlClass": "dependent",
"value": "Residence"
},
{
Expand Down

0 comments on commit 1d3d51e

Please sign in to comment.