I am trying to make a formula, where if the user got a profile image, it displays the image, and if not it displays a default image.
But I can’t find the else statement. What is the right way to do something like this in Weweb?
ps. Sorry for the noob questions, and probably more incoming, am new here and still trying to find my way.
You can use two different formulas:
If :
ifEmpty:
2 Likes
@AdrienB Sorry for asking another noob question. But how and where do you set a default image like you did with the defaultImageUrl?
People who are also looking for this question:
- Upload your default image to WeWeb
- Go to Formulas → Add formula
- Give it a name, e.g. defaultImageUrl
- Edit formula: Paste the URL of the uploaded image
- click on Create formula
Now this formula is added to your project and will be accessible in the last tab with the name ‘From Project.’
2 Likes