Windows 10 pro
php 8.2.4
Yes the command I got it from drupal page for project update.
Did I get it wrong ?
Contents of the local project json file
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "
https://www.drupal.org/project/drupal →
",
"support": {
"docs": "
https://www.drupal.org/docs/user_guide/en/index.html →
",
"chat": "
https://www.drupal.org/node/314178 →
"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"composer/installers": "^2.0",
"drupal/admin_toolbar": "3.4.2",
"drupal/core-composer-scaffold": "^10.1",
"drupal/core-project-message": "^10.1",
"drupal/core-recommended": "^10.1",
"drupal/flexslider": "*",
"drupal/devel": "^5.1",
"drush/drush": "*"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "minimum-stability",
"prefer-stable": true,
"config": {
"allow-plugins": {
"composer/installers": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"sort-packages": true,
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library"
],
"web/modules/contrib/{$name}": [
"type:drupal-module"
],
"web/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"web/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"web/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"web/profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"web/themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site:
https://www.drupal.org/docs/installing-drupal →
",
" * Read the user guide:
https://www.drupal.org/docs/user_guide/en/index.html →
",
" * Get support:
https://www.drupal.org/support →
",
" * Get involved with the Drupal community:",
"
https://www.drupal.org/getting-involved →
",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}
Done what you recommended, the result is this
composer require 'drupal/flexslider:^3.0@alpha'
./composer.json has been updated
Running composer update drupal/flexslider
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/flexslider, it could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
After running your command it returns me this error
composer require 'drupal/flexslider:^3.0@alpha'
PHP Fatal error: Declaration of Drupal\Console\Composer\Plugin\Installer::getLocationPattern($frameworkType) must be compatible with Composer\Installers\Installer::getLocationPattern(string $frameworkType): string in C:\Users\Gaetano\AppData\Roaming\Composer\vendor\drupal\console-extend-plugin\src\Installer.php on line 48
Fatal error: Declaration of Drupal\Console\Composer\Plugin\Installer::getLocationPattern($frameworkType) must be compatible with Composer\Installers\Installer::getLocationPattern(string $frameworkType): string in C:\Users\Gaetano\AppData\Roaming\Composer\vendor\drupal\console-extend-plugin\src\Installer.php on line 48
PS C:\xampp\htdocs\prove\web> composer update
PHP Fatal error: Declaration of Drupal\Console\Composer\Plugin\Installer::getLocationPattern($frameworkType) must be compatible with Composer\Installers\Installer::getLocationPattern(string $frameworkType): string in C:\Users\Gaetano\AppData\Roaming\Composer\vendor\drupal\console-extend-plugin\src\Installer.php on line 48
Fatal error: Declaration of Drupal\Console\Composer\Plugin\Installer::getLocationPattern($frameworkType) must be compatible with Composer\Installers\Installer::getLocationPattern(string $frameworkType): string in C:\Users\Gaetano\AppData\Roaming\Composer\vendor\drupal\console-extend-plugin\src\Installer.php on line 48
I keep having problems when I perform upgrade or installation of modules.
Can you tell me how to uninstall and reinstall composer and if this can cause problems for existing projects locally ?
I ran the c omand
composer check-platform-reqs
Check platform requirements for packages in the vendor directory
composer-runtime-api 2.2.2 success
and the other calls are also a success
I ran composer self-update --2
It is already using the latest available version of Composer 2.6.5 (channel 2.x).
And it comes back to me that I am using version 2.
In any case if I update admin_toolbar to version 3.4.2.it returns me this error
composer require 'drupal/admin_toolbar:^3.4'
The "3.4" constraint for "drupal/admin_toolbar" appears too strict and probably does not match what you want. See https://getcomposer.org/constraints
./composer.json has been updated
Running composer update drupal/admin_toolbar
Loading composer repositories with package information
Updating dependencies
Could not resolve requirements in a set of installable packages.
Problem 1.
- The root composer.json file requires drupal/admin_toolbar, but could not be found in any version; there may be an error in the package name.
Potential causes:
- A typo in the package name.
- The package is not available in a sufficiently stable version, according to the minimum stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It is a private package and you forgot to add a custom repository to find it.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for additional common problems.
Installation failed, returning ./composer.json and ./composer.lock to their original contents.
I haven't figured out how to solve this problem
I wasted a lot of time on it and the solution was
Update to a specific version of core
I am developing the theme manually with the starterKit
If I understand correctly by installing the superfish module the pool-down menu comes automatically
Ciao da tuo consiglio ho migliorato il codice e ho così modificato il file region.html.twig
{%
set classes = [
'region',
'region--' ~ region|clean_class,
]
%}
{% if content %}
{# Definisce i colori delle Varie aree #}
{% if region == 'header' %}
{% elseif region == 'primary_menu' %}
{% set classes = ['bg-color-green',] %}
{% endif %}
<div {{ attributes.addClass(classes) }} >
{# il content serve per la visualizzazione dei blocchi inseriti nelle singole Regioni #}
{{ content }}
</div>
{% endif %}
And now it works.
Can you tell me if this method is right or is it better to do the checks in page ?
sorry jaypan i have activated the devel module but the drush instruction you pointed out doesn't restore anything for me.
Am I doing something wrong ?
Hi Japan, I need to install devel to get the list via drsuh.
I found the file core.services.yml in which I found several lines which I post to you.
country_manager:
class: Drupal\Core\Locale\CountryManager
arguments: ['@module_handler']
Drupal\Core\Locale\CountryManagerInterface: '@country_manager'
date.formatter:
class: Drupal\Core\Datetime\DateFormatter
arguments: ['@entity_type.manager', '@language_manager', '@string_translation', '@config.factory', '@request_stack']
Drupal\Core\Datetime\DateFormatterInterface: '@date.formatter'
theme.manager:
class: Drupal\Core\Theme\ThemeManager
arguments: ['%app.root%', '@theme.negotiator', '@theme.initialization', '@module_handler']
calls:
- [setThemeRegistry, ['@theme.registry']]
Drupal\Core\Theme\ThemeManagerInterface: '@theme.manager'
theme.initialization:
class: Drupal\Core\Theme\ThemeInitialization
arguments: ['%app.root%', '@theme_handler', '@cache.bootstrap', '@module_handler']
Drupal\Core\Theme\ThemeInitializationInterface: '@theme.initialization'
theme.registry:
class: Drupal\Core\Theme\Registry
arguments: ['%app.root%', '@cache.default', '@lock', '@module_handler', '@theme_handler', '@theme.initialization', '@cache.bootstrap', '@extension.list.module']
tags:
- { name: needs_destruction }
calls:
- [setThemeManager, ['@theme.manager']]
Drupal\Core\Theme\Registry: '@theme.registry'
Does it mean that each line, like <date.formatter:>, can be used as a service ?
Hello and thank you for your response.
The version is 10.0.8
No, I did not apply the patch.
Maybe I better wait for the next version
I am doing some testing to figure out how to create a sub-theme and how to manage it.
No problem I also use google translate
Ciao sto creando il sub tema Olivero ma con poco successo. Ho provato ad usare il codice per la creazione del sub tema con lo starterkit ma ritorna l'errore f"impossibile trovare il file specificato"
Il sub tema lo chiamo olivero_sub ma non so se scrivo bene il tutto.
Ti posto la linea, che ho usato
php core/scripts/drupal generate-theme <olivero_sub> --name "<Olivero Sub Theme>" --starterkit olivero
Thank you for this clarification.
Everything is clearer to me
Hi Jaypan I moved the Services folder under udf\src and it no longer reports the error.
Major error on my part and I apologize for that.
I thank you so much for your helpfulness and patience. On my own I would never have been able to do it.
I did a test and from the module that calls the service I removed the namespace
use Drupal\udf\Services\CentralizedFunctions ;
Do you think this is an error ?
From what you told me in the last answer this is where I need to use the Backslashes
The src folder should I write it or there is no need for it ?
Again thank you
Currently the Services folder is inside udf (module name). The class pathname is written the same way.
The way you wrote me the Services folder must be under udf\src\Services, I will move it and let you know
Surely this will be the problem
sorry this I passed it to you with translation. Below is the one without.
Whenever I made changes I always cleared the cache
Error: Class "Drupal\udf\Services\FunzioniCentralizzate" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of core\lib\Drupal\Component\DependencyInjection\Container.php).
Thanks for the example, some things I had read are clearer to me now.
Unfortunately, after making the changes nothing has changed.
The error is this
Error: Class "Drupal\udf\Services\CentralizedFunctions" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of core\lib\Drupal\Component\DependencyInjection\Container.php).
As far as I understand the problem is in the creation, I have checked and done various tests but nothing.
If you don't mind I'll repost the whole code, I'll leave the code in Italian so you don't make mistakes
udf.services.yml
services:
func-centra:
class: Drupal\udf\Services\FunzioniCentralizzate
FunzioniCentralizzate.php
<?php
namespace Drupal\udf\Services ;
/**
* Service class for the [UDF] module.
*/
class FunzioniCentralizzate {
/**
* Intestazione delle Stampe
*/
public function StampaInte($storage, $campo, $modulo, $chiChiama) {
ksm('servizio');
}
}
Module from which the service is retrieved
<?php
namespace Drupal\udf\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface ;
use Symfony\Component\DependencyInjection\ContainerInterface ;
use Drupal\udf\Services\FunzioniCentralizzate ;
class AttivitaIspeQueryForm extends FormBase {
/**
* The entity type manager
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*
* The func-centra service.
* The value for this property is set when the form is built in __construct().
* @var \Drupal\udf\Services\FunzioniCentralizzate ;
*/
protected $entityTypeManager ;
protected $FunzioniCentralizzate ;
/**
* Constructs an ExampleForm instance.
*/
public function __construct(EntityTypeManagerInterface $entityTypeManager,
$FunzioniCentralizzate) {
$this->entityTypeManager = $entityTypeManager ;
// Use the value received from create(), and set it as $this->funzioniCentralizzate.
$this->FunzioniCentralizzate = $FunzioniCentralizzate ;
}
/**
* {@inheritdoc}
* Retrieve the service from the service container. This is passed to __construct().
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity_type.manager'),
$container->get('func-centra')
);
}
I preferred to put the whole code back in since there is also the EntityTypeManagerInterface service and I might have done something wrong
sorry you are right, always in the submitForm I have the call to the header function
// Stampa Intestazione 'UTENTE
$htmlInte = $this->StampaInte( $storage, $campo, $modulo, 'AtIs' ) ;
If the function is in the same file it works. When I entered the service I deleted it.
I will summarize the names of the files and their contents.
Custom form name udf
In the udf folder I have the services file
udf.services.yml
services:
func-centra:
class: Drupal\udf\Services\FunzioniCentralizzate
Created subFolder udf/Services, inside of which is the file
FunzioniCentralizzate.php
<?php
namespace Drupal\udf\Services ;
/**
* Service class for the [UDF] module.
*/
class FunzioniCentralizzate {
/**
* Intestazione delle Stampe
*/
public function StampaInte() {
ksm('servizio');
}
}
In the submitForm of another custom form I call the service like this
\Drupal::service('func-centra')->StampaInte() ;
I clear the cache and when I perform the confirmation I get this error back
The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\udf\Form\ActivitaIspeQueryForm::PrintInte() in Drupal\udf\Form\ActivitaIspeQueryForm->submitForm() (line 991 of modules\custom
And I don't understand why it all seems to colllegate well
I also did another test. I moved the file FunctionsCentralized.php to the src\Form folder also changing the namespace and .yml path. I get the same error back but if I perform clear cache it shows me service which I call up with devel
Yes the ID is at both at zero. I did the test as you recommended but nothing.
I noticed that while for the other displays there is a choice of whether to override or not, for the minipager it is not provided and the choice is the same for all
The error that came back to me was due to misidentification.
Now I get the error back that it cannot find the class FunctionsCentralized
I read this article
https://www.drupal.org/docs/drupal-apis/services-and-dependency-injectio... →
along with others and got confused, as in some it says service and in others services.
At this point I think the error may lie here. The same for the name of the Folder
Article from drupal.org, it puts both the yml and service file names in the file as
services and not service
I made this change and it returns the error that there is an error in the parameters
Symfony\Component\DependencyInjectionException\InvalidArgumentException: The service file "modules/custom/udf/udf.services.yml" is not valid: it contains invalid keys Array. Services have to be added under "services" and Parameters under "parameters". in Drupal\Core\DependencyInjection\YamlFileLoader->validate() (line 453 of ...
I don't know what to try to figure out where the error is.
Also in the namespace there are those who write service and those who write services
What an egregious oversight.
Removed the semicolon but the error persists I must have made some other mistake
Hi Jaypan I read some documentation and did some testing using your code, but the error returns
Symfony\Component\DependencyInjectionException\ServiceNotFoundException: You have requested a non-existent service "centralize.service".
It means I misspelled or placed the files somewhere.
I'll report what I did
The name of the form I use is udf, so I have the udf/src/Form folder where all the files I use are placed
In the udf folder I created the file udf.service.yml with these lines
service:
centralize.service:
class: Drupal\udf\Service\CentralizedFunctions;
In the udf folder I created the Service folder and inside the Service folder I created the file FunctionsCentralized.php with this code
<?php
namespace Drupal\udf\Service;
/**
* Service class for the [UDF] module.
*/
classCentralizedFunctions {
/**
* Header of the Printouts.
*/
function PrintInte() {
ksm('service');
}
}
In the form from which I intend to read the functions to be called, in the submitFormt function I have this line
\Drupal::service('centralize.service')->PrintInte() ;
I don't understand what I am doing wrong and I hope I have been clear
Thanks for the code Jaypan, this is new to me.
From your code it doesn't look difficult.
I will read some papers and update you
Hi I would like to make something similar.
In a view I have a global text field that points to a form in the form folder
When I click on the link I would like to take the data from the node and display it on a new node
This line is not so clear to me.
\Drupal::service('current_route_match')->getParameter('phrases');
Same for redirect.
Could you give me an example with fixed data so I understand better what they are for and how to use all the parameters ?
See the hoo_entity_presave hook
It is doable, Before saving to the title field attribute the fields you are interested in
Partially, I have done several tests and from the code used, the label remains out. So it doesn't fit.
Either way it stays out what I need.
There is a huge difference in code between forms and custom forms
I did some testing and looked at the source.
On one field I used the code that I normally use
$form['tassazione'] = [
'#type' => 'select' ,
...
'#prefix' => '<br /> <div class="container-inline">' ,
'#suffix' => '</div>' ,
];
html code
<div class="container-inline destra"><div class="js-form-item form-item js-form-type-select form-type-select js-form-item-stampa form-item-stampa">
and on another the one suggested by the article
$form['actions'] = [
'#type' => 'actions' ,
'#weight' => 400 ,
'#attributes' => ['class' => ['destra']] ,
];
html code
<div class="destra form-actions js-form-wrapper form-wrapper" data-drupal-selector="edit-actions" id="edit-actions"><input data-drupal-selector="edit-submit" type="submit" id="edit-submit" name="op" value="VISUALIZZA" class="button js-form-submit form-submit" />
</div>
Looking at the source it seems to be better to use the second code, it integrates the class inside the div, without creating another div that has to be closed afterwards
Can you check and tell me if it is so ?
I read the article, and understood that it is good for the theme to handle the various views, however there are situations (especially for a management), where there is a need to make changes only in some parts of the form.
At the time I was advised to use prefix to have the data inline. Does this mean that it is not the right method ?
I tried the example in a custom form and it works.
If I use it in form_alter, with a field created with the CLI it no longer works for me.
And since there is no documentation, I have a hard time figuring out how to do what I need to do.
In the specific case I would like to have 2 or 3 fields side by side.
I'll post an example
Label1 Label2 Label3
Input1 Input2 Input3
Going around the net I saw that flex should be the solution. Tried it on a custom form it works, in form_alter it does not
Hi Jaypan, I took your advice and re-read the various articles on how to link a class to an element.
I checked with kint() if the class was added correctly and it is
You can check in the code that the field is read-only and it works.
<input readonly="readonly" class="sfondo-arancio-naut form-number" data-drupal-selector="edit-field-benzina-totale-0-value" type="number" id="edit-field-benzina-totale-0-value" name="field_benzina_totale[0][value]" value="0.74" step="0.01" placeholder="Carburante" />
Only for back-ground does not work. Probably the code to use will be another one or you have to overwrite the CSS somewhere.
I also did another test, in the prefix I use this code to display the label and field inline and I added the background class
The label and field read them inline but the background nothing. Same for the text color.
$form['field_fuel_total']['widget']['#prefix'] = '<div class="container-inline background-orange-naut">' ;
I wasted a lot of time on this, and I don't know whether to think that in the attributes the classes that refer to the color work
Question, has anyone ever changed the background color si an element ?
I ask this because it should be standard for everyone and not form based
Si la classe è in un file css che ho aggiunto al sub tema e la utilizzo nella view senza problema (nella form non so se sia diverso l'uso)
I attach you the html code taken from the inspection. The i Italian class is sfondo-arancio-naut
I noticed the class is in the div and not in the field
Am I doing something wrong ?
<div class="field--type-decimal field--name-field-benzina-totale field--widget-number sfondo-arancio-naut js-form-wrapper form-wrapper" data-drupal-selector="edit-field-benzina-totale- wrapper" id="edit- field-benzina-totale-wrapper"> <div class="js-form-item form-item js-form-type-number form-type-number js-form-item-field-benzina-totale-0-value form-item-field-benzina-totale-0-value">
<label for="edit-field-benzina-totale-0-value">TOTALE</label>
<input readonly="readonly" data-drupal-selector="edit-field-benzina-totale-0-value" type="number" id="edit-field-benzina-totale-0-value" name="field_benzina_totale[0][value]" value="8.93" step="0.01" placeholder="Carburante" class="form-number" />
</div>
Tried it and it works the way I need it. That was what I needed.
If I understand correctly the submit comes after the _presave and after all the other controls.
Thanks I learned one more thing
Hi wombatbuddy, interesting article, I don't understand why it is not important to have read-only checkboxes.
I will expand what I am implementing for clarity.
In a form I have some numeric fields, whose amount is calculated based on the values of some fields.
In the call back of an entity_reference field, widget (entity_autocomplete), I make checks and based on these I set the checkbox field true or false. Based on the value of the chckebox, this in the _entity_presave I perform calculations one way or the other.
If I don't put the field read-only, the user could change it creating anomalies
I had thought of moving the checkbox control from the callback to the '_entity_presave but in the $entity-> object I can't get the value of the checkbox field.
on I don't know if I have been clear
If I understand correctly with this code
array_unshift($form['actions']['submit']['#submit'], 'my_module_form_submit');
I can check the value of the checkbox. Not fixed to true but depending on the situation. I hope it also works with checkbox disable
Thanks for this other information
Hi Jaypan, below is the html code part
<input readonly="readonly" data-drupal-selector="edit-checkbox-display" type="checkbox" id="edit-checkbox-display" name="checkbox_display" value="1" class="form-checkbox" />
I wrote the code you sent me in form_alter and this part of the code
'#attributes' => [
'readonly' => 'readonly',
],
does not make the field read-only
$form['checkbox_display'] = [
'#type' => 'checkbox',
// Set the value the same as the hidden element.
'#value' => $value,
// Set the element to be readonly.
'#attributes' => [
'readonly' => 'readonly',
],
];
Jaypan I tried your suggestion but readonly doesn't work
Hello ,Jaypan,
I did a test and when the field has #access=FALSE it does not save in the dataBase.
Can you tell me at what stage to use $form_state->getValue('checkbox')
Hi Jaypan,
in your message you wrote that in the submit
When the form is submitted, you can use $form_state->getValue('checkbox').
The question was do I update the read-only field in entity_presave ?
Otherwise I didn't understand where to update the field
Thank you for the solution.
If I understand correctly I update the field (defined as access=false) in the preSave
Resolved.
I don't know if it will help anyone else.
The problem was given by 2 files that had the same class name.
Changed the class name and no longer came up with error 500
okay, what I notice is that it also does it when I call up the custom forms
I saw but with error 500 it doesn't bring anything in the logs.
The same i happens with update.php
I state the problem minimally
I have entity reference field with autocomplete widget.
When the owner user logs in, the field needs to be updated with the select(select) list widget.
Image
Code for the change
Keep in mind that there is the query to filter by owner code
but I don't know it is the right way to operate
if ( in_array ( 'titolare', $ruoli ) ) {
$TitolareID = cercaProfilo( 'TitolareID' );
// Filtra i Richiedenti del TITOLARE
$storage = \Drupal::entityTypeManager()->getStorage('node');
$qry = $storage->getQuery()
->condition( 'type', 'anagrafica_richiedenti' )
->condition( 'field_titolare', $TitolareID )
->sort( 'title', 'ASC' )
->execute();
$nodi = $storage->loadMultiple( $qry );
$options = [];
foreach($nodi as $nodo){
$options[$nodo->nid->value] = $nodo->title->value;
}
$form['field_richiedente']['widget']['#options'] = $options ;
Hi wombatbuddy, let me explain.
In a form I have various fields and among them a field field_requester of type entity reference (linked to content type Master Requester).
For searching the field is linked to a views entity reference with display applicants_er.
So far so good and in the search displays, all nodes of the content type Master Applicants.
This form can be used by 2 users, administrator and owner.
When it is used by the owner user the views entity reference, it must be filtered based on the field field_owner (entity reference of the content type Master Applicant), it is the ID of the owner user (the filtering should be done not on the ID of the user but based on the ID of the field field_owner.
I have thought of 2 solutions:
The first, programmatically filter views entity reference, based on the owner ID:
The second transform the field field_requester from entity_autocomplete type to select, filtering it in the same way as the views entity reference.
The second solution is the most convenient to use for the owner user.
I hope I have made myself clear.
I'll post you the code for transforming the requesting field_field from entity_autocomplete to select:
$field = 'field_applicant' ;
$form[$field] = [
'#size' => 20,
'#type' => 'select',
'#multiple' => FALSE,
'#empty_option' => t(' -- All -- '),
'#options' => $options
];
unset( $form[$field]['#size'] );
I thank you for the various references and links.
I will read them carefully and try them one at a time. There are various topics that have never been addressed.
Both in rendering the view and in the dataBase.
I was thinking of hooking some code to the click on the button but I have no idea how to invoke the code