SHARE
TWEET

Untitled

a guest Sep 11th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.   })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top