Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Show form value as part of a static field#382

Discussion options

I want to create a "Are you sure you want to delete ?" form where I would like to set to a certain value.
The form format is JavaScript object of JSON (either is ok).

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?

You must be logged in to vote

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

Comment options

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 userender() function without having to include the runtime compiler.

You must be logged in to vote
4 replies
@rvanschoren
Comment options

Thanks. Do you happen to have an example that uses the render() function?

@adamberecz
Comment options

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);},},},};
Answer selected byrvanschoren
@rvanschoren
Comment options

Thank you so much! I'm so happy I found VueForm.

@cp-bwg
Comment options

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Questions
Labels
None yet
3 participants
@rvanschoren@adamberecz@cp-bwg

[8]ページ先頭

©2009-2025 Movatter.jp