Posted on Leave a comment

Lightweight jQuery Input Mask Plugin For Phone Numbers | Free jQuery Plugins

1. Download, unzip the plugin and then insert the JavaScript jquery-input-mask-phone-number.js after jQuery JavaScript library.

2         integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
3         crossorigin="anonymous">
4 </script>
5 <script src="jquery-input-mask-phone-number.js"></script>

2. Create a normal text field for the telephone input.

1 <input type="text" id="yourphone">

3. Call the function on the input field to mask and format the strings you typed in xxx-xxx-xxxx format.

1 $(function(){
2
3   $('#yourphone').usPhoneFormat();
4
5 });

4. Customize the format for phone numbers.

1 $(function(){
2
3   $('#yourphone').usPhoneFormat({
4     format: '(xxx) xxx-xxxx'
5   });
6
7 });

Lightweight jQuery Input Mask Plugin For Phone Numbers

Source: Lightweight jQuery Input Mask Plugin For Phone Numbers | Free jQuery Plugins

Posted on Leave a comment

Use column formatting to customize SharePoint | Microsoft Docs

Both column formatting and SharePoint Framework Field Customizer extensions enable you to customize how fields in SharePoint lists are displayed. The Field Customizer is more powerful because you can use it to write any code that you want to control how a field is displayed.

Column formatting is more easily and broadly applied. However, it is less flexible, because it does not allow for custom code; it only allows for certain predefined elements and attributes.

The following table compares column formatting and the Field Customizer.

Source: Use column formatting to customize SharePoint | Microsoft Docs

Posted on Leave a comment

Attendance column not showing up as field when creating new calendar item (SP2010) – SharePoint Stack Exchange

I have a SharePoint calendar, with a little over a dozen columns (I have also added a couple extra columns). When adding/editing calendar events, I notice that the Attendance column is not showing up as a field. If I look in SP Designer, I see the column, Attendance, but it shows a blank Content Type (whereas most all the other columns have a Content Type of Event). Can someone please talk me through this? Not only do I need the Attendance column to be a field for a calendar event, but I have the same calendar on many other sites, so hopefully I can update the Content Type for the Attendance column to Event and solve my problem. Please advise.

Go to List Settings and click on Event in the Content Type section. Then click on “Add from existing site or list columns”. Choose Attendee from the list columns and click on Add.

You can also select “use this calendar to share member’s schedule” in List Settings/Title, Description and Navigation. A new content type “Schedule” will be added , which contains the Attendee field.

Source: Attendance column not showing up as field when creating new calendar item (SP2010) – SharePoint Stack Exchange

Posted on Leave a comment

jQuery $(document).ready()

Whenever you use jQuery to manipulate your web page, you wait until the document ready event has fired. The document ready event signals that the DOM of the page is now ready, so you can manipulate it without worrying that parts of the DOM has not yet been created. The document ready event fires before all images etc. are loaded, but after the whole DOM itself is ready.

Multiple Document Ready Listeners

jQuery allows you to register multiple document ready listeners. Just call $(document).ready() multiple times. Here is a multiple document ready listener example:

$(document).ready(function() {

    //DOM manipulation code

});


$(document).ready(function() {

    //DOM manipulation code

});

The two listener functions registered in this example will both get called when the DOM is ready. They will get called in the order they were registered.

Source: jQuery $(document).ready()

Posted on Leave a comment

How do I get the text value of a selected option? | jQuery Learning Center

How do I get the text value of a selected option?

Select elements typically have two values that you want to access. First there’s the value to be sent to the server, which is easy:

1
2
$( "#myselect" ).val();
// => 1

The second is the text value of the select. For example, using the following select box:

1
2
3
4
5
6
7
<select id="myselect">
<option value="1">Mr</option>
<option value="2">Mrs</option>
<option value="3">Ms</option>
<option value="4">Dr</option>
<option value="5">Prof</option>
</select>

If you wanted to get the string “Mr” if the first option was selected (instead of just “1”) you would do that in the following way:

1
2
$( "#myselect option:selected" ).text();
// => "Mr"

Source: How do I get the text value of a selected option? | jQuery Learning Center

Posted on Leave a comment

Accessing Checkbox in SharePoint using JQuery ~ Explore The SharePoint

I couldn’t find anything obvious for accessing SharePoint Check Box so chucked this together, hopefully useful for someone else 😉😎 Read this article to know about Accessing Radio Buttons using J Query in SharePoint Note: The below code/solution is applicable to accessing check box in a custom SharePoint List forms using SharePoint Designer. To know how to create a custom form in SharePoint Online, read this article Get Current Logged in User & Manager using REST API in SharePoint OnlineAccessing Check Box

Source: Accessing Checkbox in SharePoint using JQuery ~ Explore The SharePoint