Guest User

Untitled

a guest
Jun 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. ## PHP
  2.  
  3. $fields = new FieldSet(
  4. new LiteralField("Signup", "<h2>Signup for your Free GYO ID</h2>"),
  5. new EmailField("Email", "Email"),
  6. new TextField("Name", "Full name"),
  7. new DropdownField("Currently", "I am currently in", array(
  8. 'High School' => 'High School',
  9. 'Tertiary' => 'Tertiary'
  10. ),'','Select'),
  11. new DropdownField('HighSchool', 'School', $HighSchools),
  12. new DropdownField('Tertiary', 'Provider', $Tertiarys)
  13. );
  14.  
  15. ## JS
  16.  
  17. $("#HomePageSignup #Tertiary, #HomePageSignup #HighSchool").hide();
  18.  
  19. $("#HomePageSignup #Form_StudentSignup_Currently").change(function() {
  20. $("#HomePageSignup #Tertiary, #HomePageSignup #HighSchool").hide();
  21. switch($(this).val()) {
  22. case 'High School':
  23. $("#HomePageSignup #HighSchool").show();
  24. break;
  25. case 'Tertiary':
  26. $("#HomePageSignup #Tertiary").show();
  27. break;
  28. }
  29. });
Add Comment
Please, Sign In to add comment