1

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 Answer 1

4

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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
Sign up to request clarification or add additional context in comments.

3 Comments

This solution works, but if you reach the page with different querystrings it will remember the first that was transmitted. Seems like a caching issue. Reloading the page without cache works, but how can I avoid this?
maybe you can just add "?no_cache=1" to your link?
Or just put the whole content column of your form page (with condition like [page["uid"] == 512] ) in a COA_INT.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.