8 – Proper way to alter field value from submit handler

I added extra field “field_password_changed” to user account and I want to store there time of latest password change (simple input field).

Now, I added custom submit handler to catch user account edit action and currently it looks like this:

function user_form_submitted(&$form, FormStateInterface $form_state) {

  $form_state->set('field_password_changed', 'test22');

  $form('field_password_changed')('en')(0)('value')('#value') = '54321';
  $form('field_password_changed')('widget')(0)('value')('#default_value') = 'My new value';
  $form('field_password_changed')('widget')(0)('value')('#value') = 1;

  $form("field_password_changed")("#default_value") = 'ffff';


Basically I tried every suggestion from this page:

And not even one is working form me.

What is the proper way to change form field value in custom submit handler?

8 – Tracking how long it takes a user to submit a node edit form?

For a quiz node, I want to track how long it takes a user to submit a node form (the time from Drupal generating the form until the time that the user presses submit), and I want to store this duration in a field on my node.

Use case

Each node of content type Quiz is a 10 question quiz. I want to track the time that users spend filling out the node in order to track their improvement in speed over time.

I do NOT want to track the time spent on the website in general; for that, I already use Google Analytics with scroll tracking, and there is also the Time Spent module.

What I tried

On my node, I added an Integer field, Duration. My thought was that I could calculate the interval from the timestamp when the form was generated until the time the node was saved by adding code in hook_node_presave():

  $original_time = ??? // How do I get the time when the node form was generated? 
  $current_time = Drupal::time()->getCurrentTime();
  $duration = $current_time - $original_time;

Where I’m stuck is I don’t know how to get the time when the node form was created.

I tried to add a Datetime field to my node with a Default date of Current date, but the current date is not set until the node is saved, so that doesn’t work.

So, how can I track the time from generating a node edit form until the time the user presses submit?

Set a List Item Value before Submit on a new form in PowerApps

I’m using PowerApps to develop against a SharePoint List. I have a Variable that gets set and I want to set a field in a SharePoint list (within PowerApps) with the value of the variable before "SubmitForm()"

Can anyone help me with this?


8 – hook_form_alter add field after submit button to exposed view

I’m trying to add a field that would be displayed after the submit button in the rendered HTML in my hook_form_alter.


$form('include_card') = (
  '#type' => 'checkbox',
  '#title' => t('Include gift card'),
  '#weight' => 25,

Weight doesn’t seem to have any bearing on it. How would you set that up?

Submit 15 Niche forum posting backlinks on any forum for $4

Submit 15 Niche forum posting backlinks on any forum

Niche Forum posting is one of the best ways to promote your business or product but it takes some time. Forum posting is a high RII strategy because creating a very good idea in front of this influential audience can help spread your posting message to everyone far and wide. In this service you will get 15 forum post backlinks for your website or product. Forum posting is a very effective way of building backlinks. I will create 15 well-indexed forums by posting 15 different forums with your text URL in the post or signature. Link building is very important for your website because Google takes it very seriously in search engines and here your site will rank very fast.

What do you will get from my service?

  • High quality backlinks
  • First Index & more traffic
  • Google Panda, Penguin, and all Algorithm Safe
  • VІР suрроrt
  • Permanent link
  • Increase your (Page Ranking)
  • Guarantee No Spamming

if you have any questions please contact me I will try to help.


How to better name modal buttons "Cancel Request" (submit), "Cancel" (cancel)? [duplicate]

One modal-box asks the user wether they want to really cancel the request. Now there are two buttons (submit) and (cancel), but how to best name them? All other modals use text like “proceed” (submit) and “cancel” (cancel) – but wouldn’t it be confusing to use “cancel request” and “cancel”?

What would be better options?

How To Change a Search Submit URL on WordPress Using………….?

how should i change this url : http: //12
To this URL :how should i change this url :
http:// 12

using .htaccess or add_rewrite_rule
it’s a search submit URL on WordPress site

I will submit manually 400 directory submission powerful backlinks for $7

I will submit manually 400 directory submission powerful backlinks


If you are looking to promote and increment your business or website then you are at right place?

I Will submit your business or Website Details to TOP LOCAL BUSINESS DIRECTORIES.We have our own Good Ranking directories list that we will utilize. If you have an existing listing for some local directories then we will try to claim them to avoid duplicate listings. I have done a lot of projects. My best service offering you guaranteed Local SEO for your business.


  • 100% Manual Work, NAP Constant.
  • Duplicate will check for every listing
  • All Directory submission / Citations from Local IP address
  • 100% Customer Satisfaction
  • Niche-specific Directory Sites
  • Full Report With Login Details.
  • Quick response, 24/7 Lifetime support

➨Qualityover Quantity
➨Alwaysover Deliver
➨400 Verified Links from unique domain
➨MultipleURL Allowed w/ specific titles.
➨Randomuser name for less footprints
➨Privateproxies used for less footprints
➨Suggestedas Tier-2
➨SpintaxAccepted in title,desc.
➨RSS+ Ping
➨Detailedexcel report contains Exact URLs.
➨All directory live links submitted to Premium Indexer

✓ Local Listings can appear onthe 1st page of Local Google search results.
✓ Targets local consumers readyto buy a certain product or service.
✓ Organic traffic will be drivento your website.
✓ It will give you qualifiedleads, since people from your geographical area will be directed to you.
✓ These listings help you tobeat your competitor.
✓ Enhance your visibility onmajor local search results.
✓ Create Permanent Backlinks.


Please contact me before placing an order to avoid any confusion or cancellation.

Feel free to contact us


web development – How to stop creating multiple invoices when employee hits submit more then once while webpage is loading

I am a amateur coder and I have a problem on my website that when an employee is creating a new invoice sometimes it takes time to load so they click submit more then once, which creates duplicate invoices for the system charging the customers card multiple times. How can I make it so the submit button is limited to one so this doesn’t happen. Or point me to a book for me to learn more as I haven’t been able to find something on my own.

Should submit button colors match color scheme or be consistent across products?

The consistency of the design is not done by the choice of colors or its quantity, but by the design itself. The color is just one more component within the design guidelines.

If you define color variability in the design guidelines as a design component, the color change in the buttons can be an element of manifestation of this variable, provided that the shape of the buttons is sufficiently personal and recognizable.

A clear and extreme example of the use of different colors in design is the Carrefour supermarket logo. Although one of the basic canons in corporate image is the consistency of unique and representative colors, when Carrefour presented its new design in 2009, it did so with a considerable number of gradients to be used in its different communication needs.

enter image description here

Page from the Carrefour Brand Book

I think the problem is not the color of the buttons in relation to the theme of each product but the color of the buttons in relation to the design guidelines of your website.

This design guidelines can define that all the buttons must keep the same color or vary according to the theme, both options are valid.