Showing the contents of a hidden div tag if a registered visitor is logged in

Sometimes it is helpful to initially hide an element, and then check to see if the visitor is logged in.

If the visitor is logged in, you can add logic to display that hidden element. In this case, you can use the {module_isloggedin} module that displays a value of 1 if customer is logged in and 0 if they are not logged in.

Javascript Option

Add the following code to hide the div container and its contents:

<div id="hiddenform" style="display:none">
...
</div>

And this is the script used to display the div container if the visitor is logged in: