Hi @jsitter. I'm not exactly sure what you want to accomplish (change the value of a form input element in the DOM/browser with React/JS before it's submitted by the user?).
I think I can answer the second part of your question. A disclaimer: while I have a few years of experience with Drupal and now Backdrop, I don't claim to know all the nooks and crannies of Field API, so this info may be somewhat incomplete.
Yes, as you said, Backdrop and Drupal use the "name" attribute of the form input elements to pull and process the user's form submission. For SOME Field API fields, Backdrop generally uses the pattern you pointed out to create form input elements for Field API fields (but not always - it really depends on the field type. This pattern is typical of Field API text fields):
name="field_name[LANGCODE][DELTA][value]"
(The above would be the name attribute of the form input element). Often, LANGCODE is 'und', which means that the language has not explicitly been defined. DELTA is used to indicate the delta for multi-value fields (Field API fields can store a specific number of values, or can be defined as "unlimited", in which case a button "Add another" is shown in the form to add another input element). In those cases DELTA identifies the field's delta, for example [0] indicates that the form input element will be parsed as the first value of that multi-value field, etc. For fields that have only one value, the delta will always be 0. And 'value' indicates that the value submitted by the user will be stored as the value for that field in the database. If you look at the database, each Field API field has a specific table where its values are stored. For example, the values for text field called "field_text" will be stored in a table called "field_data_field_text", and the value submitted by the user will be stored in a column named "field_text_value". You'll also see other columns in that table, including delta and language.
If you are trying to modify the form on the server side, before it's sent to the browser, the best way to do it is to create a module that implements hook_form_alter. You then will have access to an array structure that you can modify as needed to change what's shown in the form. Typically people use this hook to modify the description of the field, to hide a field, to rearrange the orders in which the fields are shown, to change its default value, attaching js or css, etc.
I hope this helps!
EDIT: you can also use hook_field_attach_form, which allows you to modify the form array right after Field Attach API "attaches" the field to the form structure
Hi @jsitter. I'm not exactly sure what you want to accomplish (change the value of a form input element in the DOM/browser with React/JS before it's submitted by the user?).
I think I can answer the second part of your question. A disclaimer: while I have a few years of experience with Drupal and now Backdrop, I don't claim to know all the nooks and crannies of Field API, so this info may be somewhat incomplete.
Yes, as you said, Backdrop and Drupal use the "name" attribute of the form input elements to pull and process the user's form submission. For SOME Field API fields, Backdrop generally uses the pattern you pointed out to create form input elements for Field API fields (but not always - it really depends on the field type. This pattern is typical of Field API text fields):
name="field_name[LANGCODE][DELTA][value]"
(The above would be the name attribute of the form input element). Often, LANGCODE is 'und', which means that the language has not explicitly been defined. DELTA is used to indicate the delta for multi-value fields (Field API fields can store a specific number of values, or can be defined as "unlimited", in which case a button "Add another" is shown in the form to add another input element). In those cases DELTA identifies the field's delta, for example [0] indicates that the form input element will be parsed as the first value of that multi-value field, etc. For fields that have only one value, the delta will always be 0. And 'value' indicates that the value submitted by the user will be stored as the value for that field in the database. If you look at the database, each Field API field has a specific table where its values are stored. For example, the values for text field called "field_text" will be stored in a table called "field_data_field_text", and the value submitted by the user will be stored in a column named "field_text_value". You'll also see other columns in that table, including delta and language.
If you are trying to modify the form on the server side, before it's sent to the browser, the best way to do it is to create a module that implements hook_form_alter. You then will have access to an array structure that you can modify as needed to change what's shown in the form. Typically people use this hook to modify the description of the field, to hide a field, to rearrange the orders in which the fields are shown, to change its default value, attaching js or css, etc.
I hope this helps!
EDIT: you can also use hook_field_attach_form, which allows you to modify the form array right after Field Attach API "attaches" the field to the form structure