Skip Navigation

[Resolved] View not working in gravity forms

This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 16 replies, has 2 voices.

Last updated by Sammut 7 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#395345

I have added a shortcode to a radio button option in gravity forms:
[wpv-view name="Get Resort" pid="16285"]

The shortcode is pulled in from wp-toolset. The code it is rendering is:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>[wpv-post-title][wpv-post-body view_template='None']
          <img src="[wpv-post-featured-image size='medium' output='url']" />
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

The view is working fine, however, the featured image is not showing, please see the screen shot: hidden link

It is only showing

 <img src=" " /> 

Can you offer any assistance on how to get this show display? Gravity Forms says there is nothing on their end that would hinder it's display.

#395500

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sammut,

Thank you for contacting our support forum.

From what I see is that you are using the shortcode within value parameter of the form.

Could you provide me with a screenshot of this setup so I can have a look ?

Thanks,
Shane

#395718
ishot-14.png

Thank you, I have uploaded an image. You are correct. It is all working aside form the image not displaying.

#395754

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sammut,

Thank you for the screenshot.

Could you try using single quotes instead of the double quotes for the view parameter.

Thanks,
Shane

#395762

Hi Shane, yes I had tried that. It does not work either. Instead of showing <img src=" " /> it just shows <img src> in the source view.

#395764

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sammut,

It could be the shortcode api that wordpress implemented that is causing the shortcode not to render.

I know that our views plugin had provided a workaround for this but it is limited to the use of our Content templates.

For example shortcodes used within our content template that is passed as a parameter into an html attribute will get rendered.

Anything outside of the views content templates and custom views will get processed through the new wordpress shortcode api.

Have a look at the document regarding the new shortcode api.
https://make.wordpress.org/core/2015/07/23/changes-to-the-shortcode-api/

There isn't really much we can do about this one since wordpress no longer supports shortcodes being used in this fashion.

Thanks,
Shane

#395769

Yes, i was aware of that. However, what I find odd is that using [wpv-post-featured-image output='url'] will not even show the URL of the image.

#395772

Also, adding a static image does work: <img src='/wp-content/uploads/2016/05/ishot-14-236x300.png' />

#395773

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sammut,

Thats strange, i'm not seeing any issue with the shortcode itself. I just tested this and it works and displays the url.

Could you try testing it by adding the featured image shortcode in the body of your post and see if it displays the url for the featured image?

These small tests will help to identify the issue.

Thanks,
Shane

#395808
ishot-15.png

Hi Shane, yes in a normal view it works just fine.

#395846

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sammut,

So you're saying that the view works in the gravity form when you provide a direct url correct? Instead of using the [wpv-featured-image] shortcode right?

I must apologize for the back and forth, I would like to ensure that i'm understanding the context under which it does not work clearly.

Thanks,
Shane

#395855

If I use [wpv-featured-image] it does not work. If I manually enter in a path to an image (<img src='/wp-content/uploads/2016/05/ishot-14-236x300.png' />) it does work. It can diaplay i,ages just mot from [wpv-featured-image] shortcode.

THANK YOU!!!!

#395861

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sammut,

So the view itself works in the Gravity form when a direct url is provided correct?

#395878

Correct!

#396441

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sammut,

This is very odd.

Would you mind providing me with admin access to the website ? I'll enable the private fields for your next response.

Also please provide me with links to the form on the backend and frontend and the view as well.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.