Print custom field in user edit form in block

Following code prints user edit form in block:

function notifikacie_custom_block_info() {  $  blocks['user_profile'] = array(    'info' => t('User profile edit'),    'cache' => DRUPAL_NO_CACHE,  );   return $  blocks; }  function notifikacie_custom_block_view($  delta = '') {   $  block = array();        global $  user;       module_load_include('inc', 'user', 'user.pages');       $  block['subject'] = t('Fill your profile');       $  block['content'] = drupal_get_form('user_profile_form', $  user);    return $  block; } 

But it does not print custom fields created in admin/config/people/accounts/fields. How do I print those custom fields?

Why do 2019-era email clients [(+/-) a few years] often allow you to delete or enter new destination addresses, but not fully edit them?

Suppose that you are writing an email. You mistype someone’s address in the “To” field. For example, maybe you write, “john.reed@blah.com.” Before sending the email, you remember that that person spells their name in a funny way. You want to delete the letter “H” in “john.” The correct email address is “jon.reed@blah.com”

In a significant number of present-day email clients you cannot edit an email address already entered into the “To” field. Once you press enter or shift the keyboard focus to the body of the email, the “To”-address changes. The user interface changes what you have typed into something which can be deleted/removed, but not edited. This is also true of the carbon-copy fields. If you mistype someone’s email, you have to delete the address completely, and re-type it. For many email clients, left-clicking on the email address might delete it, but it does not enable text editing.

I am talking about the front-end of the interface, not what’s under the hood. What is weird is that in the years from 2000 to 2010, editing a destination email address was trivial. In most email clients, the “To” field was a text-box. You could click anywhere inside of the “To” field and type almost anything you liked. The backspace key worked fine; the delete key worked fine; anything.

Features do not become popular in multiple competing companies user-interfaces, unless those features are an improvement over the old way of doing things. There must be a rationale for disallowing users from editing email addresses previously typed into the “to” field. Technically, you can edit them by deleting and re-typing from scratch, but hopefully my meaning is apparent. What is the thinking behind this? Is it a matter of making “the common case” fast? Which user-cases are faster/easier using the (new or delete) style of design instead of the old (edit text) style of design?

Unable to edit SharePoint Online site in SharePoint Designer

My organization just enrolled for O365 and have enabled SharPoint for creating sites. I have created a Site Collection and am the primary Site Collection Owner of the site. However, when I try to open the site in Designer, it asks for credentials. When I provide my organization’s credentials, it says incorrect credentials. When I provide my live account credentials, it does not accept it and asks me to re-enter the credentials.

Previously it gave me an error “This feature has been disabled by your administrator”. I did a registry hack and the error was gone.

Please let me know if there are any settings that need to be done at the O365 admin level to allow opening sites in SPD. At the site level, I have already enabled opening sites in SPD.

How to edit a Sharepoint list from an AngularJS list?

I am pretty new with AngularJS, and I need to be able to edit some entries of a Sharepoint list but from an AngularJS list that I made.
This is my code right now:

<!DOCTYPE html> <html> <head>    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">    <script src="angular.js"></script>     <style>         .myTable th {             padding: 10px;             cursor: pointer;         }         .myTable, .myTable tr, .myTable td {             border: 1px solid #ccc;             border-collapse: collapse;             padding: 6px;         }         .material-icons {             font-size: 17px;         }    </style>    <script>         var myApp = angular.module("myApp", []);           myApp.controller("myController", function($  scope, $  http) {             $  scope.editablerow = '';              //Here I call the Sharepoint List             $  http({                 method:'GET',                 url:_spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Contacts List')/items?$  select=*,Name/Title&$  expand=Name",                 headers: { "Accept": "application/json;odata=verbose" }             }).success(function(data, status, headers, config) {                 var dataResults = data.d.results;                 $  scope.contacts = dataResults;             }).error(function(data, status, headers, config) {                 alert("Error! The list's data cannot be found.");             });              //And this is for the edit options             $  scope.editContent = function(contact) {                 $  scope.editablerow = angular.copy(contact);             }             $  scope.loadTemplate = function(contact) {                 if(contact.ID === $  scope.editablerow.ID) return 'edit';                 else return 'view';             }             $  scope.saveData = function(indx) {                 $  scope.rows[indx] = angular.copy($  scope.editablerow);                 $  scope.reset();             };             $  scope.reset = function() {                 $  scope.editablerow = [];             }         });     </script> </head> <body>     <div ng-app="myApp">         <div ng-controller="myController" class="myCode">             <table class="myTable">                 <thead>                     <tr>                         <!--So these are the columns of my list-->                         <th>                             <i class="material-icons">attach_file</i>                         </th>                         <th>Edit</th>                         <th>ID</th>                         <th>Name</th>                         <th>Title</th>                         <th>Message</th>                     </tr>                 </thead>                 <tbody>                     <!--Here I call the results which are in the following scripts-->                     <tr ng-repeat="contact in contacts" ng-include="loadTemplate(contact)">                     </tr>                 </tbody>             </table>              <!--This is the Script to show the results normally-->             <script type="text/ng-template" id="view">                 <td>                     <i ng-if="contact.Attachments" class="material-icons">attach_file</i>                 </td>                 <td>                     //This is the button to open the "Edition mode"                     <a ng-click="editContent(contact)" style="cursor:pointer">                         <i class="material-icons">mode_edit</i>                     </a>                 </td>                 <td>{{contact.ID | number}}</td>                 <td>{{contact.Name.Title}}</td>                 <td>{{contact.LinkTitle}}</td>                 <td>{{contact.Message}}</td>             </script>              <!--This is the Script to show the results in the Edit mode-->             <script type="text/ng-template" id="edit">                 <td style="text-align: center;">                     <i ng-if="contact.Attachments" class="material-icons">attach_file</i>                 </td>                 <td>                     <button ng-click="saveData($  index)">Save</button>                     <button ng-click="reset()">Cancel</button>                 </td>                 <td>{{contact.ID | number}}</td>                 <td>{{contact.Name.Title}}</td>                 <td><input type="text" ng-model="editablerow.LinkTitle" /></td>                 <td><input type="text" ng-model="editablerow.Message" /></td>             </script>         </div>     </div> </body> </html> 

So the thing with my code is that when you click on the Edit button of each row it will open the Edition mode, there it will only be able to edit the LinkTitle and the Message fields. Obiously the code doesn’t work, when you click Save it doesn’t upload the changes to the list.

I know I’m missing something and I’d like to know what is it ..and I would appreciate if someone can work an answer using my example code 😀 Thanks


CODE UPDATE:

<!DOCTYPE html> <html> <head>    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">    <script src="angular.js"></script>     <style>         .myTable th {             padding: 10px;             cursor: pointer;         }         .myTable, .myTable tr, .myTable td {             border: 1px solid #ccc;             border-collapse: collapse;             padding: 6px;         }         .material-icons {             font-size: 17px;         }    </style>    <script>         var myApp = angular.module("myApp", []);           myApp.controller("myController", function($  scope, $  http) {             $  scope.editablerow = '';              //Here I call the Sharepoint List             $  http({                 method:'GET',                 url:_spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Contacts List')/items?$  select=*,Name/Title&$  expand=Name",                 headers: { "Accept": "application/json;odata=verbose" }             }).success(function(data, status, headers, config) {                 var dataResults = data.d.results;                 $  scope.contacts = dataResults;             }).error(function(data, status, headers, config) {                 alert("Error! The list's data cannot be found.");             });              //And this is for the edit options             $  scope.editContent = function(contact) {                 $  scope.editablerow = angular.copy(contact);             }             $  scope.loadTemplate = function(contact) {                 if(contact.ID === $  scope.editablerow.ID) return 'edit';                 else return 'view';             }              //Here's the part that was missing, but still doesn't work :/             $  scope.saveData = function(indx) {                 $  scope.rows[indx] = angular.copy($  scope.editablerow);                 var data = {                     __metadata: { "type": "SP.Data.Contacts_x0020_ListListItem" },                     Title: "Some Title"                 };                 $  http({                     method:'POST',                     url:_spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Contacts List')/getItemById("+indx+")",                     headers: {                         "Accept": "application/json;odata=verbose",                         "X-RequestDigest": document.getElementById("__REQUESTDIGEST").value,                         "content-type": "application/json;odata=verbose",                         "X-HTTP-Method": "PATCH", //Not sure if maybe it is "MERGE"?                         "If-Match": "*"                     },                     data: JSON.stringify(data)                 }).success(function(data, status, headers, config) {                     alert("Updated");                 }).error(function(data, status, headers, config) {                     alert("Error! The data cannot be updated.");                 });                 $  scope.reset();             };             $  scope.reset = function() {                 $  scope.editablerow = [];             }         });     </script> </head> <body>     <div ng-app="myApp">         <div ng-controller="myController" class="myCode">             <table class="myTable">                 <thead>                     <tr>                         <!--So these are the columns of my list-->                         <th>                             <i class="material-icons">attach_file</i>                         </th>                         <th>Edit</th>                         <th>ID</th>                         <th>Name</th>                         <th>Title</th>                         <th>Message</th>                     </tr>                 </thead>                 <tbody>                     <!--Here I call the results which are in the following scripts-->                     <tr ng-repeat="contact in contacts" ng-include="loadTemplate(contact)">                     </tr>                 </tbody>             </table>              <!--This is the Script to show the results normally-->             <script type="text/ng-template" id="view">                 <td>                     <i ng-if="contact.Attachments" class="material-icons">attach_file</i>                 </td>                 <td>                     //This is the button to open the "Edition mode"                     <a ng-click="editContent(contact)" style="cursor:pointer">                         <i class="material-icons">mode_edit</i>                     </a>                 </td>                 <td>{{contact.ID | number}}</td>                 <td>{{contact.Name.Title}}</td>                 <td>{{contact.LinkTitle}}</td>                 <td>{{contact.Message}}</td>             </script>              <!--This is the Script to show the results in the Edit mode-->             <script type="text/ng-template" id="edit">                 <td style="text-align: center;">                     <i ng-if="contact.Attachments" class="material-icons">attach_file</i>                 </td>                 <td>                     <button ng-click="saveData($  index)">Save</button>                     <button ng-click="reset()">Cancel</button>                 </td>                 <td>{{contact.ID | number}}</td>                 <td>{{contact.Name.Title}}</td>                 <td><input type="text" ng-model="editablerow.LinkTitle" /></td>                 <td><input type="text" ng-model="editablerow.Message" /></td>             </script>         </div>     </div> </body> </html> 

Magento 2 Admin – Edit Products – Disable Lazy Loading

I have tried looking to see if this has been asked before, but can’t seem to find any information. Hope fellow developers can point me in the right direction.

Magento 2 has a lot of Knockout.js / Lazy loading. Generally this is a good thing. However the issue I am having is sometimes I have to edit multiple products and I would normally open the products in different browser tabs and expect them to be fully loaded. However in magento 2 you have to be on the page for the content to load as it will keep showing the loading icon until you do.

enter image description here

What I want is not for this to be in the loading state, but actually load the page/content. Appreciate the help. Thanks

SharePoint List column limit, item doen’t letting me edit list item

I have a list having 27 single line text columns, 7 multi line text columns, 7 Date and Time columns and 5 Person or Group columns. I was really wondering why I am unable to edit or save people picker value or multi line text columns values.

I know it doesn’t exceeded row size. But I really couldn’t understand why it is not letting me edit those columns.

Get Column Value dynamically and edit the column manually in Sharepoint Edit Form

I am creating a leave system.

There are fields like:

  1. Type of leave as text
  2. From date as date
  3. To date as date and there is a calculated column named ‘RequestedDays’ which calculates the number of leave days requested excluding weekends.

Now, I need a field in the edit form which dynamically updates to 8*’RequestedDays’ as soon as requestor enters his From date and To date.

I would also like to edit this ‘leave hours’ field manually and then submit to my manager for approval. How can I do this?