Allow users to link to social profiles

My app allows users to have their own public profile page. I’d like users to have the ability to add links to other social media profiles.

Right now, I’ve found I can upload the icon image and link the image to a user field so that a user can edit it in their account screen. What I can’t seem to figure out is how to make it dynamic so it only shows if the user has input something in the field.

For example, I’ve got Facebook, Instagram, and Linked in icons on the user’s profile page, what if the user doesn’t have a linked in or doesn’t want to include it? How can I make the LinkedIn icon not show?

Was thinking this could be done with a post but couldn’t work out how that could work unless users had to upload the social icon.

UPDATE: I figured out how to set visability for the image to not show but it doesn’t help with formatting. If I have a line of social icons and I hide icons that the user has not input a value it show’s an empty spot. Any ideas on how to get the images to shift?

1 Like

If you line then up against a left or right location they will move when not visible.

Thanks for the response @hughmcampbell. Can you expand what you mean by that? Does it need to be at the side of the page?

It’s a web app but I’ve been building it with invisible mobile margins so it still looks good on mobile even though the page isn’t really responsive.

It’s not immediately clear on the GUI, but you can create an invisible container using a rectangle element (no borders and no background) and wrap that container around the icons.

Line them up either in a row or column in that container, depending how you want it to look like, then set the visibility options.

You’ll have to play around and test for the alignment to work, tbh. Not the best solution, but it’s a workaround for now.

I personally prefer it if there’s some sort of restriction to the WYSIWYG functionalities (kinda like Microsoft Word vs Powerpoint, if you will), but that’s another topic altogether :joy:

1 Like

@vancewong you’re truly a lifesaver. Thank you! I need to play a bit with it to get it to look good and maybe change out my icons to make sure they all match nicely but it works!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.