function updateChannels(input)
{
const container = document.getElementById('description-container');
const count = parseInt(input.value, 10);
// Empty the container to reset the descriptions
container.innerHTML = '';
// Vérifie que l'entrée est un nombre entre 1 et 4
if (isNaN(count) || count < 1 || count > 4)
{
input.value = ''; // Reset if the value is invalid
alert('Please enter a number between 1 and 4.');
return;
}
// Add description fields based on value
for (let i = 1; i $request->input('user'),
'machines_id' => 1,
'manipulation_name' => $request->input('manipulation_name'),
'system_issue' => $request->input('system_free_issue'),
'system_qualified' => $request->input('system_qualified'),
'howmany_injections' => $request->input('channelCount'),
'column_id' => $request->input('column_description'),
'guard_column_id' => $request->input('guard_column_description'),
'type_samples' => $request->input('type_of_samples'),
]);
// Récupérer l'ID de l'enregistrement créé
$manipulationId = $manipulation->id;
//récupérer le nombre de description de channels :
$channelCount = $request->input('channelCount');
// Boucler pour insérer chaque description de canal
for ($i = 1; $i name('submit_before'); // Déplacement de ->name() avant le point-virgule
Проблема в том, что извлекается все, кроме значений моих текстовых полей, которые генерируются динамически (имя текстовых областей начинается с Channel_description_);
#parameters: array:9 [▼
"_token" => "0dusC043ovYJMZGShMlsBdioLY3nR8Zyw00zrqAO"
"user" => "1"
"manipulation_name" => "eerrere"
"system_free_issue" => "yes"
"system_qualified" => "yes"
"channelCount" => "2"
"column_description" => "21"
"guard_column_description" => "17"
"type_of_samples" => "reeee"
Они имеют значение NULL.
$description = $request->input("channel_description_$i");
null // маршруты/web.php:72
Если у меня их два, в базу данных вставляются две строки, но в описание помещается NULL.
[img]https: //i.sstatic.net/7FnM1jeK.png[/img]
С другой стороны, если текстовые поля присутствуют при загрузке формы, я получаю их значения в $ переменная запроса.
Изображение вкладки запроса инструмента разработчика (9:58):


Это HTML-код (не создан):
Admin

LC1
Personal Information
Please select a user.
Firstname and Surname of User
The manipulation name field is required and must contain at least 3 characters.
Name of the manipulation/analysis/test
System Free of Issue
Have you checked that the system is usable and free of issue?
Please select an option for system free of issue.
Yes
No
System Qualified
Has the system been qualified within less than one year (six months)?
Please select an option for system qualification.
Yes
No
Operation cancelled, please contact Jacques Tchutchoua or Cédric Delporte to resolve this issue.
Describe Your Use
Channels
Please enter a channel count between 1 and 4.
Please provide a description for Channel 1.
Column Internal ID
Please select a column description.
Select a column reference
APFP-G001
APFP-G002
APFP-G003
Guard Column Internal ID
Please select a guard column description.
No guard-column
Type of Samples
Please enter the type of samples.
Submit the form
Подробнее здесь: https://stackoverflow.com/questions/791 ... ng-the-dom
Мобильная версия