Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork98
Show form value as part of a static field#382
-
I want to create a "Are you sure you want to delete ?" form where I would like to set to a certain value. I could supply the value for name in the form data (via load). Is there a way I can reference the value in the static text? |
BetaWas this translation helpful?Give feedback.
All reactions
Sure, here it is:
import{h}from'vue';constschema={other_el:{type:'text',default:'Text',},static:{type:'static',content:{props:['el$'],render(){returnh('b',this.el$.form$.el$('other_el').value);},},},};
Replies: 1 comment 4 replies
-
Yes, you can access it like this withruntime compiler: constschema={"other_el":{"type":"text","default":"Text",},"static":{"type":"static","content":{"template":"<b>{{ el$.form$.el$('other_el')?.value }}</b>","props":['el$']}}} If you don't need JSON necessarily, you can use |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks. Do you happen to have an example that uses the render() function? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Sure, here it is: import{h}from'vue';constschema={other_el:{type:'text',default:'Text',},static:{type:'static',content:{props:['el$'],render(){returnh('b',this.el$.form$.el$('other_el').value);},},},}; |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thank you so much! I'm so happy I found VueForm. |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Is there a way to have a numeric or text input bind to the slider value ? I would like them to be able to type or use the slider, and they bind. Couldn't find a way to do this in the builder demo. |
BetaWas this translation helpful?Give feedback.