TYPO3 8.7. Form prefill input field

2.3k views Asked by At

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

There are 1 answers

3
matin On BEST ANSWER

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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}