Mattheiu, this is amazing - working to implement it now. Would you think itās possible to have different visibilities/tabs depending on who is viewing the transaction? Assuming that they are the same user type, but different parties in a transaction for example.
Hi and thank you!
At some point the users should be two different user groups even if itās the same transaction. Seller group /Buyer group for example. Otherwise it should be a huge load of work to make this setup function.
To know how to hide/show multiple blocks at the same time, as Mark did, itās very easy:
You can can add as many document.getElementById("listXXX").style.display = "none" as you wishā¦ Just replace ānoneā by āblockā each time you want the block to appear on a specific button click.
You just have to play with ānoneā and āblockā
Hi Matthieu, thanks for the reply. Ideally I would make them different user groups, but the issue is that products are dynamically created on my site by users and thereās no way to set up additional user groups like āseller/buyerā without messing with the general setup of the site. Would it be possible to hide the CTA block for a user assuming their recordID matches a condition or element on the page? and then to have two CTA blocks on the page w/ two separate scripts?
Lovely functionality either way, but figured Iād ask!
Great! Was actually just pulling up that thread to share with you and ask - will give this a shot for my use case and can report back. Seems that this may be the new solution however, unsure if those changes to Softr ever messed with it.
Hi @matthieu_chateau this is the best SOFTR custom code I have seen yet. I am trying to use this as a menu bar and set it up for desktop but I donāt have a working solution for mobile. Do you have any code to turn the CTA or custom code buttons into a hamburger menu bar/any sort of dropdown. That would be insanely helpful!
Here is the new code to have a dropdown when on mobile
Insert it a custom code block, above the blocks you want to display. These are hard coded buttons, not CTA block buttons
Yes, but before I need to know which version do you want to use (I need to get this organized, there 3 or 4 different versions of the tabs featureš ).
if you want to use this feature with a Softr CTA block, it is going to be a problem as it needs the cta block to have the option āscroll toā. Otherwise the buttons have a default behaviour which leads the user to the homepage. That being said Iām gonna ask Artur to remove this behaviour from CTA buttons, as it forces users to add additional stuff when they want to insert code.
I could add an event.preventDefault() but asking Softr team to remove this would be easierā¦ for everyone!
If you want to use custom, hardcoded buttons, yes, itās possible Here. You see the code? just remove all the lines with document.getElementById("blockX").scrollIntoView("blockX");
Iām using the hardcoded so I can fully customize the buttonsā¦
It worked beautifully, thank you. This has completely changed the user experience on my app now, thank you! (It also makes it easier to manage on Softr as its just one page.
So, how can I have some fun with the code to customize itā¦ i.e. adding some animations to how the new block is displayed. I saw one example had the block come in from the left?
Concerning new page in the same modal => no, as Softr team decided to not let this happen anymore (unfortunately) if Iām correct. I will try to find a solution with a JS snippet. It will appear in the ācustom codingā section of the public community if I find it