how to use this
-
i use the hidden js to display the particular fields with radio button with in that the repeater is not working,
the code follows
<h2 class=”short”>Patient Information</h2>
<div class=”row”>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”first-name”>First Name *</label>
[text* first-name id:first-name class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”last-name”>Last Name *</label>
[text* last-name id:last-name class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<label for=”birth-date”>Birth Date *</label>
[date* your-date min:1950-01-01 max:2018-12-31 step:7 class:required “2013-04-01″]
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”contact-email”>Your Email Address *</label>
[email* your-email id:contact-email class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”contact-home-phone”>Home Phone *</label>
[text* home-phone id:contact-home-phone class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”contact-mobile-phone”>Mobile Phone *</label>
[text* mobile-phone id:mobile-phone class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”contact-address”>Address *</label>
[text* contact-address id:contact-address class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”contact-city-town”>City or Town*</label>
[text* contact-city-town id:contact-city-town class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”contact-province”>Province *</label>
[text* contact-province id:contact-province class:form-control]
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”contact-postal-code”>Postal Code *</label>
[text* contact-postal-code id:contact-postal-code class:form-control]
</div>
</div><div class=”col-lg-12″>
<h2 class=”short”>Transferring Pharmacy Location</h2>
</div><div class=”col-lg-6″>
<div class=”form-group”>
<label for=”existing-pharmacy”>Existing Pharmacy *</label>
[select* existing-pharmacy include_blank id:existing-pharmacy class:existing-pharmacy “Alberta” “Edmonton”]</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”pharmacy-phone”>Pharmacy Phone Number *</label>
[text* pharmacy-phone id:pharmacy-phone class:form-control]
</div>
</div><div class=”col-lg-12″>
<h2 class=”short”>Prescription(s) to be Transferred</h2>
<h5>Please provide us with drug name or prescription number for each of the prescriptions you would like to transfer to Chappelle Pharma.</h5>
</div><div class=”col-lg-12″>
[radio prescription-transferred id:prescription-transferred default:1 “Yes, please transfer all of my prescriptions to Rexall” “No, please only transfer the prescriptions listed below:”]
</div>[field_group drug-details id=”drug-details”]
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”drug-name” id=”drug-name”>Drug Name *
[text* drug-name class:form-control] </label>
</div>
</div>
<div class=”col-lg-6″>
<div class=”form-group”>
<label for=”rx-number” id=”rx-number”>RX Number *
[text* rx-number class:form-control] </label>
</div>
</div>
<div class=”col-lg-12″>
<div class=”form-group”>
<label for=”transfer-notes” id=”transfer-notes”>Notes *
[textarea* transfer-notes 100×10 class:form-control] </label>
<label for=”fill-my-prescription” id=”fill-my-prescription”> [checkbox fill-my-prescription “Fill my prescription as soon as the prescription transfer is complete.”]</label>
<label for=”hold-my-prescription” id=”hold-my-prescription”> [checkbox hold-my-prescription “Hold prescription until I request a fill.
“]</label>
</div>
</div>
[/field_group]<hr>
<div class=”col-lg-12″>
<h3 class=”short”>Important Note</h3>
<h6>It is committed to protecting the privacy of our customers’ information. Any and all information provided on this form will be kept strictly confidential in accordance with our privacy policy.</h6>
<h6>By submitting this form you are giving consent for a representative to contact the transferring indicated to complete your prescription transfer request.</h6>
</div><div class=”col-lg-12″>
<div class=”form-group”>
[submit class:btn class:btn-primary class:btn-lg “Request Transfer”]
</div>
</div>
</div><script language=”javascript” type=”text/javascript”>
// Hide the Text field by default
document.getElementById(‘drug-name’).style.display = ‘none’;
document.getElementById(‘rx-number’).style.display = ‘none’;
document.getElementById(‘transfer-notes’).style.display = ‘none’;
document.getElementById(‘fill-my-prescription’).style.display = ‘none’;
document.getElementById(‘hold-my-prescription’).style.display = ‘none’;
document.getElementById(‘prescription-transferred’).addEventListener(‘click’, displayTextField);
function displayTextField() {
// Get the value of the currently selected radio button. ‘select-a-size’ is the name of the radio buttons you specify in the form builder
var radioText = document.querySelector(‘input[name=”prescription-transferred”]:checked’).value;
if (radioText == ‘No, please only transfer the prescriptions listed below:’) {
document.getElementById(‘drug-name’).style.display = ‘block’;
document.getElementById(‘rx-number’).style.display = ‘block’;
document.getElementById(‘transfer-notes’).style.display = ‘block’;
document.getElementById(‘fill-my-prescription’).style.display = ‘inline’;
document.getElementById(‘hold-my-prescription’).style.display = ‘inline’;
} else {
document.getElementById(‘drug-name’).style.display = ‘none’;
document.getElementById(‘rx-number’).style.display = ‘none’;
document.getElementById(‘transfer-notes’).style.display = ‘none’;
document.getElementById(‘fill-my-prescription’).style.display = ‘none’;
document.getElementById(‘hold-my-prescription’).style.display = ‘none’;
}
}
</script>
- The topic ‘how to use this’ is closed to new replies.