Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // Add classname .choicless-message to field in GF Admin
  2. $('.choiceless-message').each(function() {
  3. let $el = $(this)
  4. let inputsWithChoice = $el.find('input').length
  5. let inputsWithChoiceDisabled = $el.find('input:disabled').length
  6. let waitlistHref = $el.data('waitlistHref') || '#'
  7.  
  8. if (inputsWithChoice === inputsWithChoiceDisabled) {
  9. $('<div />').addClass('alert alert-warning').html('<p class="mb-0">There are no more open slots available<br /> <a href=".waitlistHref.">Join the waitlist</a></p>').appendTo($el)
  10. }
  11. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement