The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Image Logic
How to display a default image if one is not uploaded:
[if 88][88 size=thumbnail show_image=1][/if 88]
[if 88 equals=""]<img src="/wp-content/uploads/2018/05/Default_Profile.png" alt="" />[/if 88]
Should work right? Except it's not, I've tied every possible variation I can think of including not_like and nothing works, I either end up with the default picture not showing at all or it showing alongside a picture if one has been uploaded.
Anyone know the correct procedure to achieve this please?
Is there an ELSE function?
May 24, 2018 at 1:50 pm
https://formidableforms.com/knowledgebase/file-upload/#kb-shortcode-options
Scroll down to "Show default image".
May 24, 2018 at 3:07 pm
Okay, yes, thanks - but how is that any different to what I have already?
[if x][x show_image="1"][/if x]
[if x equals=""]<img src="default.png" alt="" />[/if x]
looks pretty much identical to the code I posted above:
[if 88][88 size=thumbnail show_image=1][/if 88]
[if 88 equals=""]<img src="/wp-content/uploads/2018/05/Default_Profile.png" alt="" />[/if 88]
I can't imagine you would have posted that without knowing for sure that I had something wrong, but I am afraid despite going over my code numerous times I can't see it, so would you please humour me and point out where my code is wrong please?
I mean, I copied and pasted the example from the point in the docs you linked to and filled in the blanks. It's really weird that I can't see what I did wrong; I am usually really good at spotting differences like this!
p.s. I don't know where the https://s18718.pcdn.co is coming form, I did not post that!
May 24, 2018 at 6:51 pm
Ok. Let's troubleshoot then. Disable all plugins except Formidable and switch to the default theme. That is the only way we know if your issue is with FP or something else.
Discussion closed.