Hisashi Posted July 5, 2021 Share Posted July 5, 2021 Hello, I'm creating a donation button for my website publishers, I want to make this field not appear on articles (record) if it doesn't have a $value. The button is always visible <a href="https://www.paypal.com/donate?business=$value&no_recurring=0&item_name=Donate¤cy_code=BRL" data-ipstooltip="" _title="Donate" target="_blank"><span style="font-family:arial,helvetica,sans-serif; font-size:16px;"><span class="ipsBadge MangaInfo"><i class="fas fa-hand-holding-usd"></i> <strong>Donate</strong></span></span></a> The question is... Is there any code I can enter to make the button only visible if a $value is set? SeNioR- 1 Link to comment Share on other sites More sharing options...
opentype Posted July 5, 2021 Share Posted July 5, 2021 {{if $formValue}} // Your code {{endif}} Wrap it all like this. Hisashi and SeNioR- 1 1 Link to comment Share on other sites More sharing options...
Hisashi Posted July 5, 2021 Author Share Posted July 5, 2021 2 minutes ago, opentype said: {{if $formValue}} // Your code {{endif}} Wrap it all like this. Thanks for this one more opentype, it worked perfectly! Link to comment Share on other sites More sharing options...
Hisashi Posted July 21, 2022 Author Share Posted July 21, 2022 On 7/5/2021 at 1:44 PM, opentype said: {{if $formValue}} // Your code {{endif}} Wrap it all like this. Resurrecting the topic 😅 Using 'Yes/No' field type, I can make that... Yes = appear a text No = nothing appears Would you know how to do this? Link to comment Share on other sites More sharing options...
opentype Posted July 21, 2022 Share Posted July 21, 2022 The provided code should already work for that scenario the way it is. Hisashi 1 Link to comment Share on other sites More sharing options...
Hisashi Posted July 21, 2022 Author Share Posted July 21, 2022 It really worked 😅 Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts