this seams to be a bug with cookies toolkit in DWCS5, it works correctly in DWCS4.
It will also work correctly if you install eCart after Cookies toolkit.
I have logged this in our bugbase so we can release a fix for it in a future update.
in the mean time, the code that should go in the value would look like this:
<?php echo WA_RandomPassword(6, false, true, true, "")?>
the arguments to the WA_RandomPassword are:
Length: Number of characters for the random password
Upper Case: true or false
Lower Case: true or false
Numbers: true or false
Special Characters: string of any special characters you would like to include.
the finished code block for the set session value behavior will look like this:
<?php
if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["NewPW"] = "".WA_RandomPassword(6, false, true, true, "") ."";
}
?>