Tell us what you are trying to do?
Is there any documentationHello,
I use Toolset with Elementor Pro.
I use toolset to manage a publication type "Book". Among the fields of this publication type, its EAN number.
This site is affiliated with an online bookstore to sell the books listed. The line of code for the affiliation is of the type :
<script type="text/javascript" id="script_widget_notice" src="hidden link"></script>
So to generate this line automatically, I need to include the EAN reference in the line of code. But I can't do it.
I edit a text block in Elementor, I can display the EAN field value using [types field='ean' output='normal' format='FIELD_VALUE'][/types]
but when I use <script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='normal' format='FIELD_VALUE'][/types]&color=1&width=195&id_affiliate_widget=xxx"></script>
It doesn't work. The value of the EAN field is not integrated.
Example page: hidden link
I don't know how to do it anymore. Thank you in advance for your help.
Thank you in advance for your help,
Vincent
Translated with hidden link (free version) that you are following?
Is there a similar example that we can see?
What is the link to your site?
Hello, I suggest you try output='raw' in your Types field shortcode, and remove the format attribute to prevent problems with formatting:
<script type="text/javascript" id="script_widget_notice" src="<em><u>hidden link</u></em> field='ean' output='raw'][/types]&color=1&width=195&id_affiliate_widget=xxx"></script>
If this does not work as expected, something else must be going on. I may need to take a closer look.
Hello, thank you for your reply. Unfortunately... no change...
It looks like the Types field shortcode is not being evaluated, it is simply written out into the content of the page. See the screenshot here, you can see the shortcode is not executed in the script tag. Can you explain how you inserted the script tag into the page here? Is it included in an Elementor builder template somehow? What type of "block" or "element" did you use to insert this content? Please provide a screenshot or screenshots showing the script tag code in the template or page builder, and let me know which blocks or element is used to insert this content.
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put.
But I also tried :
[wpv-autop]<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>[/wpv-autop]
and
<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>
It's the same...
Incomprehensible to me.
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put.
But I also tried :
[wpv-autop]<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>[/wpv-autop]
and
<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>
It's the same...
It's incomprehensible to me...
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put.
But I also tried :
[wpv-autop]<script type="text/javascript" id="script_widget_notice" src="<em><u>hidden link</u></em> field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>[/wpv-autop]
and
<script type="text/javascript" id="script_widget_notice" src="<em><u>hidden link</u></em> field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>
It's the same...
It's incomprehensible to me...
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put.
But I also tried :
[wpv-autop]<script type="text/javascript" id="script_widget_notice" src="<em><u>hidden link</u></em> field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>[/wpv-autop]
and
<script type="text/javascript" id="script_widget_notice" src="<em><u>hidden link</u></em> field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>
It's the same...
It's incomprehensible to me...
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put.
But I also tried with [wpv-autop][/wpv-autop] and without anything
It's the same...
It's incomprehensible to me...
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put.
But I also tried with wpv-autop and without anything
It's the same...
It's incomprehensible to me...
Yes, that's exactly the problem.
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put in a text bloc (in text mode, not visual mode).
But I also tried :
[wpv-autop]<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>[/wpv-autop]
and
<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>
It's the same...
It's incomprehensible to me...
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put in a text bloc (in text mode, not visual mode).
But I also tried :
[wpv-autop]<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>[/wpv-autop]
and
<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>
It's the same...
It's incomprehensible to me...
Yes, that's exactly the problem.
I tried several ways, they all give the same result. Either the code is not interpreted, or no data is sent, while above the same line returns the data...
I don't understand...
Here is the capture of what I have actually put in a text bloc (in text mode, not visual mode).
But I also tried :
[wpv-autop]<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>[/wpv-autop]
and
<script type="text/javascript" id="script_widget_notice" src="hidden link field='ean' output='raw'][/types]&color=1&width=100%&id_affiliate_widget=478"></script>
It's the same...
It's incomprehensible to me...