Badges
Accepted Solutions
Likes Received
Posts
Discussions
Ideas
Blog Posts
@Harish_Gupta6 wrote:You need to write a JS script and add onblur events on all fields and then create a function to check if all fields have been filled or not. Call this function on each field onblur event and validate the field. If all fields have the data then change the color of your button. Le...
@SanfordWhiteman ,gotcha. I presume the easiest way to do this is to wrap all the code after this#set( $currentSeminarList = $lead.metlifecompetitiondatas2 )with this#if( $currentSeminarList != "" ) All the doing code #endIt seems to behave, but is that the best practice approach?
Hmm... so my code now looks like this (and seems to be working)#set( $allSeminarDetails = { "ABC" : { "blurb":"Postman Pat", "date":"24 Aug", "time":"10:30", "attendees":0, "village":"somewhere" }, "CBA" : { "blurb":"Bob the builder", "date":"14 Aug", "time":"10:30", "a...
@SanfordWhiteman wrote:You don't need to pre-set attendees in the details Map, though it's nicely informative if you do.You aren't using this variable: #set( $attendees = $currentRegistration[1] )Splitting on just ; is fine, you don't need to put it in a character class [;] as it's not reservedI ...
@SanfordWhiteman (and for the general amusement and hopefully edification of others),I've made solid progress. My code is working as expected, and I'm getting to grips with the string maps stuff quite nicely.The output section at the end is almost 'debug' at the moment, but will go into a nice tab...
@SanfordWhiteman So, in my string, I actually get something like:GNG;4|POY;3 The code gives me the seminar, and the number is the attendees.Ultimately, my allSeminarDetails map will have blurb, date, time, and a URL.My currentSeminarDetails will end up with the right rows from allSeminarDetails PLUS...
@SanfordWhiteman ,I can switch to string keys quite happily and easily 🙂. I'm always happy to find nicer/better ways of doing things especially as it avoids the ghastly nested loop.How far off the mark am I in my desire to add more than just the details from allSeminarDetails (i.e. + the number of ...
So a nested loop in other words :).... Darn it I was hoping for something more elegant! Thanks for the help @SanfordWhiteman Next silly question. in this line here:#set( $void = $currentSeminarDetails.add($detail) )How can I add one extra element that is NOT in the $allSeminarDetails array. In th...
@SanfordWhiteman yes - this is in a token. I've tweaked things and made it behave, so now my next challenge.How to take my split string, and find each matching value in an array.I've got to this point: #set( $seminarDetails = [ {"CODE":"GNG","BLURB":"Come to GNG and learn about Poodles"}, {"CODE...