Posts

How to add new line in google forms description | New line in google forms description

 For adding new line in google forms description, please copy below script and follow the steps in the video function AddNewLineDescription () {     var form = FormApp . getActiveForm ();   form . setDescription ( 'Form Name \n testing new line' ); }

JQuery to remove the times before the selected start time

 When there are 2 time time fields like start time and end time, It should not allow the end time to be selected as less than start time. Here is a JQuery code to disable the options in End time field which are earlier than the Start time. Asume below are the options we get from the database: HTML :                           <select  id="start_dt"  name="start_dt"> <option value=""></option> <option value="{ts '2024-07-17 09:00:00'}">09:00 AM</option> <option value="{ts '2024-07-17 09:30:00'}">09:30 AM</option> <option value="{ts '2024-07-17 10:00:00'}">10:00 AM</option> <option value="{ts '2024-07-17 10:30:00'}">10:30 AM</option> <option value="{ts '2024-07-17 11:00:00'}">11:00 AM</option> </select>                  ...

How to remove null from Coldfusion Lists

Below is a code example to remove null values from a list in coldfusion. <cfset exlist = ",,4,5,6,,7"> <cfdump var="#exlist#"> <cfset arr = ListToArray(exlist)> <cfset exlist1 = arraytolist(arr)><br> <cfdump var="#exlist1#"> 

How to display date in ordinal form in Coldfusion

 There are some requirements where we need to display the date value as ordinal form. For example, 31st august. Below code will do that in coldfusion. <cfset SuffixList=["st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st"]> <cfoutput>#DateFormat(now(),'d')##SuffixList[DateFormat(now(),'d')]#</cfoutput>

How to get only the number from a alphanumeric String in ColdFusion

 If the input contains numbers and characters, and we need to get only the numeric part from that, we can use reReplace Function in Coldfusion like this: <cfset test = "rtf4545"> <cfset result = reReplace(trim(test),"[^0-9\.]+","","All")> <cfoutput>#result#</cfoutput> Output: 4545

How to add a custom confirmation message in google forms

Image
 Once google form is submitted, you can customize the confirmation message which shows to the user. To do so please follow the video as given below: