Save post as a draft if term of taxonomy not selected

I have a custom post type with metabox that contains form and few taxonomies in a side panel. Taxonomies are by default checkboxes, and at least one term of each taxonomy must be selected otherwise save post as a draft.

I have solved it but I do not know if this is the right way to do it. Could you please advice?

When I click ‘Publish’ button, function of ‘save_post’ is executed. I grab all data, validate and save it to DB. Among those data I do not have access to taxonomies from side panel only to metabox form fields. So all is saved in DB then inside the same function I grab all taxonomies and terms associated with that post and check if any taxonomy is empty if so update post status to draft. And that works but is this the right way?

As well when I edit post through ‘Quick Edit’ this no longer works. Why?

Format of finshed message when the cipher selected is “TLS_ECDH_ECDSA_WITH_NULL_SHA”

i wanted to understand difference in the “Finished message” when different cipher site selected with encryption and with out encryption.

I am able to find the format of Finished message when the selected cipher suite includes encryption as below.

when the selected cipher suite is :-“TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA”

Finished message:- Record layer header+Encryption initialization vector+Encrypted data+Handshake header+Verify data

when the selected cipher suite doesn’t have encryption involved :-“TLS_ECDH_ECDSA_WITH_NULL_SHA”. Finished message:- Record layer header+Handshake header+Verify data

please let me know if my understanding is correct ? if not please let me know how the format looks like.

How to design a chart that has an x-axis with a fixed range that is longer than the selected range?

I’m designing a web-based analytics dashboard that contains a chart in which the x-axis represents the days of a campaign, and it always shows 31 days. However, the duration of a campaign varies; it may be predefined to any period between a single to 31 days.
In cases when the campaign’s duration is shorter than 31 days, I want to make it clear which area of the chart is relevant.
Are there any existing best practice solutions for this scenario?
One idea I have is graying out the area that’s not required (see image below). A bar chart with a 31-days x-axis that shows a 7-days long campaign

The chart’s width is fixed and optimized for displaying a 31-days range. I’m not changing the number of days on the x-axis to avoid scenarios in which there is a single floating dot or bar on the screen or several data points with vast space between them (see images below). A bar chart with a 7-days x-axis that shows a 7-days long campaign A bar chart with a 3-days x-axis that shows a 3-days long campaign

Show option is both required and previously selected in dropdown list

I realize this is probably not the best way to handle the problem, but I need to shoehorn in a solution to a previously existing design.

In this situation there are a number of fields the user needs to add from a dropdown list. Some are required, some are not… each can be used only once.

The request is to indicate which items in the drowdown are required and indicate if they have been previously added.

What is the best option for this?

My first thought is to use a red asterisk next to required item and change it to a checkmark when previously added as such:

-------------- | dropdown ā–¼ | |------------| | * option 1 | | * option 2 | | āœ“ option 3 | |   option 4 | | āœ“ option 5 | | * option 6 | -------------- 

PeoplePicker always inserts 1st person selected instead of array of each person selected

I’m trying build an array named visitorsIDs[] to get the values for a PeoplePicker in SharePoint API, but no matter who I pick in the peoplePicker, the id’s that are sent are always the id’s of the 1st person selected in the people picker. Any ideas what I’m doing wrong? I appreciate any help/suggestions…

function resolvePeoplePickers() {   var peoplePicker = this.SPClientPeoplePicker.SPClientPeoplePickerDict.peoplePicker_TopSpan;  this.SPClientPeoplePicker.SPClientPeoplePickerDict.peoplePicker_TopSpan.OnUserResolvedClientScript = function (peoplePickerId, selectedUsersInfo) {  // Get information about all users.             var users = peoplePicker.GetAllUserInfo();             var userInfo = '';             for (var i = 0; i < users.length; i++) {                 var user = users[i];                 for (var userProperty in user) {                     userInfo += userProperty + ':  ' + user[userProperty] + '<br>';                 }             }             debugger;              var userloginbase = users[0].Key;             var userlogin = userloginbase.split("\");              var context = SP.ClientContext.get_current();             var newUser = context.get_web().ensureUser(xxxxxxx\' + userlogin[1]);             context.load(newUser);             context.executeQueryAsync(function () {                 //alert(newUser.get_title());             },                  function (sender, args) {                     //alert(args.get_message());                 });                 // pause for a second to let the async ensure user complete.                 setTimeout(function() {                       for (var i = 0; i < users.length; i++) {                          getAssignedToUserIdByEmail(users[0].EntityData.Email);                          visitorIDs.push(ResolvedToUser.Id);                      }                  }, 100);          };  

Adding this after my original post:

function getAssignedToUserIdByEmail(email) {          $  .ajax({             url: _spPageContextInfo.webAbsoluteUrl + '/_api/web/siteusers/getByEmail(%27' + encodeURIComponent(email) +  '%27)',             type: "GET",             async: false,             headers: {                 "accept": "application/json;odata=verbose",                 "content-type": "application/json;odata=verbose",                 "X-RequestDigest": $  ("#__REQUESTDIGEST").val()             },             success: (function (data) {                 debugger;                 if (data.d && data.d.LoginName) {                     //alert(data.d.Id);                     ResolvedToUser = data.d;                 }             }),             error: (function (e) {                 alert("Something wrong happened. ");             })         });     }  

Warning or error when incorrect number of checkboxes are selected

Good morning. I have a SharePoint list with a custom InfoPath form. One of the fields within that InfoPath form is a Choice field with checkboxes (multi-select). This field is not required, selecting none of the checkboxes is allowed. Selecting multiple checkboxes is also allowed, but selecting just one of the checkboxes is not allowed. How can we display an error or warning to the user completing the form that they must select more than one checkbox (or none at all)? If only one is selected a message should display that the field requires multiple items.

When Multiples are Allowed – Finding the IDs of the People Selected in a peoplePicker

On another page, I have a peoplepicker saving to SharePoint (when only one person can be selected). I used this tutorial (

And, I’m trying to adapt that to grab the id’s of people when more than one is allowed… I “thought” I did this correctly by putting it into an array, but I’m missing something. Appreciate any help/suggestions..

function ensureUser() {          var peoplePickerTopDivId = $  ('#peoplePickerUsers').children().children().attr('id');         var peoplePicker = this.SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerTopDivId];         var users = peoplePicker.GetAllUserInfo();         var arryuser = users[0];         if (arryuser) {             var payload = { 'logonName': arryuser.Key };             $  .ajax({                 url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/ensureuser",                 type: "POST",                 async: false,                 contentType: "application/json;odata=verbose",                 data: JSON.stringify(payload),                 headers: {                     "X-RequestDigest": $  ("#__REQUESTDIGEST").val(),                     "accept": "application/json;odata=verbose"                 },                 success: function (data, status, xhr) {                     UserId = data.d.Id;                 },                 error: function (xhr, status, error) {                 }             });         }         else {             UserId = 0;         }     }   function addRequest() {           var userID = [];         $  ('.peoplePickerUsers:selected').each(function () {             userID .push($  (this).val());         })          var item = {             "__metadata": { "type": "SP.Data.NewDepartmentListItem" },              "EmployeeID":{                 "__metadata": { "type": "Collection(Edm.String)" },                 "results": UserId             }       };           $  .ajax({             url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/lists/getbytitle('" + listName + "')/Items",             type: "POST",             contentType: "application/json;odata=verbose",             data: JSON.stringify(item),             headers: {                 "Accept": "application/json;odata=verbose",                 "X-RequestDigest": $  ("#__REQUESTDIGEST").val()             },             success: function (data) {               },             error: function (data) {              }         });         return false;     }  

How to solve the ambiguity of selected state in a segmented control with just two segments?

I’m working on a web application that has two similar data grids in a page. User should be able to switch between these two data grids within the same page.

I have used segmented buttons to navigate between these two grids. But I feel this component visually becomes a toggle, and the current state of the toggle becomes ambiguous.

As of now Iā€™m solely relying on the color / hue to show the selected state but I feel it’s kinda unclear which state is selected.

Is there a better approach to solve this problem?

Segmented buttons circled in red enter image description here