refactor(markdown-blocks/form): remove commented code related to hidden input handling

pull/21922/head
mizoo-snow21 11 months ago
parent c49dfcd298
commit 76b7dcba77

@ -39,7 +39,6 @@ const MarkdownForm = ({ node }: any) => {
const initialValues: { [key: string]: any } = {} const initialValues: { [key: string]: any } = {}
node.children.forEach((child: any) => { node.children.forEach((child: any) => {
if ([SUPPORTED_TAGS.INPUT, SUPPORTED_TAGS.TEXTAREA].includes(child.tagName)) { if ([SUPPORTED_TAGS.INPUT, SUPPORTED_TAGS.TEXTAREA].includes(child.tagName)) {
// Always set initial value for hidden inputs
if (child.tagName === SUPPORTED_TAGS.INPUT && child.properties.type === SUPPORTED_TYPES.HIDDEN) { if (child.tagName === SUPPORTED_TAGS.INPUT && child.properties.type === SUPPORTED_TYPES.HIDDEN) {
initialValues[child.properties.name] = child.properties.value || '' initialValues[child.properties.name] = child.properties.value || ''
} else { } else {
@ -188,7 +187,6 @@ const MarkdownForm = ({ node }: any) => {
} }
if (child.properties.type === SUPPORTED_TYPES.HIDDEN) { if (child.properties.type === SUPPORTED_TYPES.HIDDEN) {
// Hidden input is not displayed but maintains form value
return ( return (
<input <input
key={index} key={index}

Loading…
Cancel
Save