Comments (4)
BTW: You can also add data to the global renderingOptions
of the form and access those from within the individual Form Elements:
prototype(Some.Custom:Form) < prototype(Neos.NodeTypes:Form) {
overrideConfiguration = Neos.Fusion:RawArray {
renderingOptions = Neos.Fusion:RawArray {
foo = 'bar'
}
}
}
That can be accessed from the Form Elements rootForm
field, in Fluid for example:
{element.rootForm.renderingOptions.foo}
from form.
This is already possible with the overrideConfiguration
Setting.
e.g. when having a form definition like this:
type: 'Neos.Form:Form'
identifier: some-form
renderables:
-
type: 'Neos.Form:Page'
identifier: page1
label: 'Page 1'
renderables:
-
type: 'Neos.Form:HiddenField'
identifier: 'node'
label: 'hidden'
That node
hidden field value can be set via Fusion like that
prototype(Some.Custom:Form) < prototype(Neos.NodeTypes:Form) {
overrideConfiguration = Neos.Fusion:RawArray {
renderables = Neos.Fusion:RawArray {
# first page
0 = Neos.Fusion:RawArray {
renderables = Neos.Fusion:RawArray {
# first renderable
0 = Neos.Fusion:RawArray {
defaultValue = ${node.identifier}
}
}
}
}
}
}
Frankly, that Fusion is a bit convoluted, but a custom helper/implementation could be used to make this easier to use.
Note: hidden field values are not protected and could be changed by the client. To prevent that, a custom Form Element could be defined
from form.
BTW: You can also add data to the global
renderingOptions
of the form and access those from within the individual Form Elements:prototype(Some.Custom:Form) < prototype(Neos.NodeTypes:Form) { overrideConfiguration = Neos.Fusion:RawArray { renderingOptions = Neos.Fusion:RawArray { foo = 'bar' } } }
That can be accessed from the Form Elements
rootForm
field, in Fluid for example:{element.rootForm.renderingOptions.foo}
@bwaidelich
Did that a while ago. After an upgrade to NEOS 5.1 it doesn't work anymore. Any hints on this?
Thanks!
from form.
Ah alright, it has changed to:
prototype(Some.Custom:Form) < prototype(Neos.NodeTypes.Form:Form)
from form.
Related Issues (20)
- Broken behavior due to invalid return type hints HOT 1
- Return type of getUploadedImage() too strict? HOT 1
- Make FormValues directly available in EmailFinisher template
- 4.3 is no longer compatible with PHP 7.0 HOT 1
- DatePicker field in multi-page forms can't get unserialized
- Make FormState final
- Render id={form.identifier} around ConfirmationFinisher
- FormViewHelper generates empty fragment for action uri due to preg_replace and missing conditino
- Setup testing with Github actions HOT 1
- Multistep form goto previous step: DateTime convert error HOT 5
- Make Flow 7.x compatible HOT 4
- Multi-Step forms fail when saving objects in the Form State HOT 2
- Invoke onSubmit callback on pages
- removeRenderable does not set new index
- Make form state initialization more flexible
- Form values no longer available in custom form elements HOT 11
- NotEmptyValidator not working for radios and file inputs
- FEATURE: Allow custom attributes to be specified for SingleLineText & MultiLineText
- Create a new Release HOT 2
- Declaration must be compatible with ArrayAccess->offsetExists(offset) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form.