ok, i'm building a page and cannot seem to get the values of the checkboxes to manifest for my use on form submission with my webpage. All variables print on the html form when called, so they're not the problem. It throws no errors, just nothing prints as the variable GroupList thinks its empty. (f.y.i: This is an administrators page for changing a user's group permissions)
I've followed the ideas espoused on http://support.alphasoftware.com/Alp..._Web_Forms.htm, using checkboxes. Tried putting the a5w_checkbox function in the body section instead of head to no avail.
comments indicate notes/problems
"<head>" section
"</head>"
"<body>"
"</body>"
Its likely very simple to remedy, but i think i need another set of eyes
Can anyone help me? have i over-looked something, a conversion even?
The reason i'm using logical expressions to populate the page with checkboxes is because more groups could be created or even some deleted through the lifetime of the site
I've followed the ideas espoused on http://support.alphasoftware.com/Alp..._Web_Forms.htm, using checkboxes. Tried putting the a5w_checkbox function in the body section instead of head to no avail.
comments indicate notes/problems
"<head>" section
Code:
<%a5 '... 'Create needed variables dim groups as C = a5ws_get_groups(request,.T.) dim assigned as C = a5ws_get_user_assignments(session.userid) dim GroupList[1] as C 'Instantiate character string to display boxes dim htmlchkbx as C FOR EACH foo IN groups group = word(foo,1,"|") 'Create substring without the guid after the group name IF containsx(assigned,group) 'Pre-check boxes according to user's current group assignments htmlchkbx = htmlchkbx + a5w_checkboxes(group,"CheckBoxes[]",group) ELSE htmlchkbx = htmlchkbx + a5w_checkboxes(group,"CheckBoxes[]") END IF NEXT dim newGroups as C IF eval_valid('cmd') newGroups = CheckBoxes 'Heres where things go wrong END IF
"<body>"
Code:
<b>Assign User (<font color="#008000"><%a5 ? userid %></font>) to Groups</b><br><br> <!-- Code to get groups and display relevant checkboxes and labels --> <form action=" <%a5 ? request.script_name %> " method="post" enctype="multipart/form-data"> <%a5 ? htmlchkbx 'Checkboxes display as expected, Correct ones pre-checked according to user's current groups %> <br><br> <input type="submit" value="Assign User to Groups" name="cmd"></input> </form> <%a5 ? newGroups.dump() %> 'This displays blank
Its likely very simple to remedy, but i think i need another set of eyes
Can anyone help me? have i over-looked something, a conversion even?
The reason i'm using logical expressions to populate the page with checkboxes is because more groups could be created or even some deleted through the lifetime of the site
Comment