Oli1
February 16, 2020, 1:59pm
1
Is there any way to get the field value in the help text with the query language? Please note that the field is in a builder so I can’t get it by name. Is there anything like {{this.value}}?
youtube_id:
label: YouTube ID
type: text
help: "Can I get the value of the field in this text?"
texnixe
February 16, 2020, 2:33pm
2
No, this would have to be supported by the plugin.
Oli1
February 16, 2020, 2:41pm
3
Too bad. Thanks for the fast answer!
texnixe
February 16, 2020, 2:48pm
4
What is your use case? The only place that supports using a field value is the fieldset label…
Oli1
February 16, 2020, 3:02pm
5
I want to place a link below the field, for example this:
<a href="{{page.url}}?download-thumb={{value}}">Download Image</a>
Then in the Frontend there’s a simple script where downloads the YouTube Preview Image from YouTube to my own Server to the Images.
texnixe
February 16, 2020, 3:10pm
6
Just an idea: you could abuse the fieldset label for this purpose, with a little help from a hidden field that has a default value of page url.
mybuilder:
label: Page Builder
type: builder
fieldsets:
myfirstfieldset:
name: Fieldset Name
label: <a href="{{ hidden }}?download-thumb={{ text }}">Download Image</a>
fields:
hidden:
type: hidden
default: "{{ page.url }}"
youtubeId:
type: text
help: Click on the label above to download a video thumb.
Oli1
February 16, 2020, 5:17pm
7
Very interesting solution and it seems to work. Not the perfect way but it does the trick
texnixe
February 16, 2020, 5:24pm
8
You might want to add a feature request for the plugin.
Oli1
February 16, 2020, 9:28pm
9
I’m already in heavy conversation with Tim as we have some problems with the pagebuilder with a lot amount of fields and some other bugs