Skip to content

Instantly share code, notes, and snippets.

@salsalabs
Created July 7, 2014 16:43
Show Gist options
  • Save salsalabs/69b79fbabd32645e188a to your computer and use it in GitHub Desktop.
Save salsalabs/69b79fbabd32645e188a to your computer and use it in GitHub Desktop.
Add required designation code to a donation page
<fieldset>
<legend>Designation Code</legend>
<p>This is an area where you can make a pitch. It can run on for as long as you want, or not exist at all.</p>
<div class="formRow">
<label for="designation_code">Organization</label><span class='required'>*</span
<input type="text" id="designation_code" name="Designation_Code" val="">>
</div>
</fieldset>
<script type="text/javascript">
$(document).ready(function() {
var required = $('*[name=required]');
var val = required.val();
if (val.indexOf('Designation_Row') == -1) {
val = val + "Designation_Code,";
required.val(val);
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment