Add label and id also to custom fields
[MAILPOET-3331]
This commit is contained in:
@@ -116,9 +116,10 @@ class BlockRendererHelper {
|
|||||||
$automationId = null;
|
$automationId = null;
|
||||||
if (in_array($block['id'], ['email', 'last_name', 'first_name'], true)) {
|
if (in_array($block['id'], ['email', 'last_name', 'first_name'], true)) {
|
||||||
$automationId = 'data-automation-id="form_' . $block['id'] . '_label" ';
|
$automationId = 'data-automation-id="form_' . $block['id'] . '_label" ';
|
||||||
if (isset($formSettings['id'])) {
|
}
|
||||||
$forId = 'for="form_' . $block['id'] . '_' . $formSettings['id'] . '" ';
|
|
||||||
}
|
if (isset($formSettings['id'])) {
|
||||||
|
$forId = 'for="form_' . $block['id'] . '_' . $formSettings['id'] . '" ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@@ -42,12 +42,11 @@ class Text {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($block['id'], ['email', 'last_name', 'first_name'], true)) {
|
if (in_array($block['id'], ['email', 'last_name', 'first_name'], true)) {
|
||||||
|
|
||||||
$automationId = 'data-automation-id="form_' . $this->wp->escAttr($block['id']) . '" ';
|
$automationId = 'data-automation-id="form_' . $this->wp->escAttr($block['id']) . '" ';
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($formSettings['id'])) {
|
if (isset($formSettings['id'])) {
|
||||||
$id = 'id="form_' . $this->wp->escAttr($block['id']) . '_' . $this->wp->escAttr($formSettings['id']) . '" ';
|
$id = 'id="form_' . $this->wp->escAttr($block['id']) . '_' . $this->wp->escAttr($formSettings['id']) . '" ';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$styles = $this->inputStylesRenderer->renderForTextInput($block['styles'] ?? [], $formSettings);
|
$styles = $this->inputStylesRenderer->renderForTextInput($block['styles'] ?? [], $formSettings);
|
||||||
|
Reference in New Issue
Block a user