Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## PHP
- $fields = new FieldSet(
- new LiteralField("Signup", "<h2>Signup for your Free GYO ID</h2>"),
- new EmailField("Email", "Email"),
- new TextField("Name", "Full name"),
- new DropdownField("Currently", "I am currently in", array(
- 'High School' => 'High School',
- 'Tertiary' => 'Tertiary'
- ),'','Select'),
- new DropdownField('HighSchool', 'School', $HighSchools),
- new DropdownField('Tertiary', 'Provider', $Tertiarys)
- );
- ## JS
- $("#HomePageSignup #Tertiary, #HomePageSignup #HighSchool").hide();
- $("#HomePageSignup #Form_StudentSignup_Currently").change(function() {
- $("#HomePageSignup #Tertiary, #HomePageSignup #HighSchool").hide();
- switch($(this).val()) {
- case 'High School':
- $("#HomePageSignup #HighSchool").show();
- break;
- case 'Tertiary':
- $("#HomePageSignup #Tertiary").show();
- break;
- }
- });
Add Comment
Please, Sign In to add comment