I got a dataset with businesses (name, address, etc.). There is also a field with the url to the website of the business.
I want to hide/show a button with the link to this website.
If the url is in the database , show the button, if the field is empty, hide the button.
I got almost no knowledge of Java. If anyone could give me some help, or show me a reference to an example, it's highly appreciated.
This explenation does not seem to be an solution at all if i got help like this i would be screwed. the guy on top is exually saying he doesnt know much bout coding.. this is not a solution
Hi!
You could achieve this functionality by using several methods from our API list.
First, in order to hide/show an element use the show( ) / hide( ) functions.
In order to achieve the desired conditional effect (show the button only when there's a URL) you'll need an
If / else statement that will determine what course of action to take.
Last but not least, you'll need to access the data in order to decide rather there is a compatible URL or there is not. In Wix Code the way to do it is using the Wix Data API and specifically - the WixDataQuery.
combining these three methods you should be able achieving your goal.
Doron.
Hi Bruno,
Did you figure out the code? I would love to implement this as well? I am creating a website similar to yours.