Skip to content

Show previously entered value in text field in custom integration #997

Answered by engram-design
roland-d asked this question in Q&A
Discussion options

You must be logged in to vote

I think you might need to include the :run attribute. This basically allows you to run code when Vue runs, which is pretty neat! What this does is basically populate the globalParams.layout prop with the value from Twig, if it's set. You can see this is the SharpSpring integration.

<input :value="globalParams.endpoint" @input="input('globalParams.endpoint', $event.target.value)">

We can't use v-model due to this being in a scoped slot, otherwise this would be a bit more concise. So we use the expanded :value/@input syntax. globalParams is essentially an empty object that we can use to add whatever variables you need.

But - we need to populate it somehow from Twig.

{% set endpoint = form.s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@roland-d
Comment options

Answer selected by roland-d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants