TYPO3 8.7. Form prefill input field

安稳与你 提交于 2020-04-21 05:13:08

问题


I use Sysextension Form on TYPO3 8.7 and want to prefill input field with get parameter. In Formhandler extension it was easy possible with Tx_Formhandler_PreProcessor_LoadDefaultValues. But how does it work on new form extension?

Thanks for help!

Martin


回答1:


thanks to Stefan from Facebook - solution found on TypoScript Setup Codebox für tx_form - important is renderables { 0 { -> where "0" is number of array index of field in yaml setup. So in my case the field for "datum" is first input field of configuration.

lib.objDynFieldValue = TEXT
lib.objDynFieldValue.data = GP:datum
plugin.tx_form {
    settings {
        formDefinitionOverrides {
            anfrageformular {
                renderables {
                    0 {
                        renderables {
                            0 {
                                defaultValue TEXT defaultValue {
                                    stdWrap {
                                        cObject < lib.objDynFieldValue
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}


来源:https://stackoverflow.com/questions/46294965/typo3-8-7-form-prefill-input-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!