I need fields with widget select to make some of them read-only.
I tried both with
$form['field_localita_missione']['widget']['#disabled'] = TRUE;
that with
$form['field_localita_missione']['#attributes']['readonly'] = TRUE;
The former works but does not save the data, while the latter does not work
I'm a site webmaster who knows just enough Drupal to be able to (sometimes) add a new feature that I really need to be able to become more efficient at my job. I wound up creating a couple new global fields for Drupal 7 views, and anticipate creating more. These fields might be useful to others, so I'd like to contribute them to the Drupal community; then again, if the way I created them doesn't fit well with Drupal, then they might not be a good fit for contribution (yet).
My normal approach to module development is to un-install and re-install modules as I make new changes to test to see if they are working. I have found that if a module has a config/install folder where it is installing content type and taxonomy configuration, I have to delete the content type and any nodes of that type, the vocabulary and any terms each time I go through this un-install/re-install cycle. Is there a better way of handling this so that I don't have to keep deleting content and configuration each time I want to test a new addition to the code?
I want to create a mobile number field in the "webform" and connect it to the "smsframework" to validate mobile number with sms token
in smsframewprk setting >> phone Numbers We can define a field in different parts of drupal 8 so that the smsframework can extract the mobile number to send a text message from that field.