I have a website which has OAuth and Google Sign-In .
What i want to do is select from selectmenu when client enter the site. So every client will see different filtered page according to their email adresses.
I can already create a session and write client name on screen.
<?php if ($_SESSION["email"] == "xxx@gmail.com") { ?>
<h2>Thank you <?php echo $_SESSION["name"] ?> </h2>
<?php } ?>
I have below selectMenu with dimension country values like ( a,b,c,d,e ) I want when email adresss xxx is signed in he/she have to see only a country , and when yyy email adresss is signed in he/she have to see only b country , so on ...
Function have to select automatically and display it on screen.
selectField = dc.selectMenu('#country')
.dimension(mostSold)
.title(function (d) { return d.key })
.promptText('Which country')
.group(mostSoldGroup)
So far I found below way but it doesn't work and give error.
<?php if ($_SESSION["email"] == "xxx@gmail.com") { ?>
<?php selectField.replaceFilter([["a"]]).redrawGroup(); ?>
<?php } ?>