Hello,
I am trying to create a Form as a GridFieldComponent or access to some rendered Field through GridField_FormAction, e.g. I will have some TextField + Button / Radios + Button and after click I could get to their values.
Any ideas?
Thanks.
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hello,
I am trying to create a Form as a GridFieldComponent or access to some rendered Field through GridField_FormAction, e.g. I will have some TextField + Button / Radios + Button and after click I could get to their values.
Any ideas?
Thanks.
Can you explain better? Because you just described GridFieldDetailForm (the default for eg. GridFieldConfig_RelationEditor). Or is this what you want?
I am not sure how to use GridFieldDetailForm in this case.
I want to create not just button like you have Print or CSV export (GridField_FormAction). , but something more complex, i.e. some kind of Form which will be after / before list of items, not within rows, and I can add it as a Component.
I am not much familiar with controllers and I do not know what to put as a first parameter as Controller into Form constructor when creating Component wia getHTMLFragments($gridField). I tried to use GridField_FormAction instead of FormAction, it worked but I get an ERROR [Warning].
I'm afraid you're going to have to draw a diagram of desired outcome (indicating usability with annotations perhaps) beacuse I can't understand what exactly it is you're asking sorry.
Thank you for being patient :)
For example this form:
I just want to be able to access values of Fields when I click 'Do some Action'.