Convert form data into js variable
string
$name
The form name or scope name
array
$data
Array of data