I'm having a couple of problems. The first is that I want a multiple-option select on the registration page (and on the edit profile page, of course). I want a user to be able to choose one or more of the options in the select, and I want the UBB to take the selected values and poop out a 16x16 graphic for each. Here is what the select currently looks like:
-------------------------- in public_register_page.pl --------------------------
----------------------- in public_topic_page.pl -----------------------
after:
$rating_line ~;
I put in:
@syntype = openparencloseparen; $syntypelen = pushopenparen@syntype, $user_profile[16]closeparen; $syntype = $user_profile[16]; @syntype = splitopenparen/:/, $user_profile[16]closeparen; $syntypelen = scalaropenparen@syntypecloseparen; $synloop = 0; while openparen$synloop <= $syntypelencloseparen { $syntype[$synloop] = scalaropenparen$syntype[$synloop]closeparen; if openparen$user_profile[16] =~ m/1/g closeparen { # $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/2/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/3/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/4/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/5/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/6/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/7/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/8/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/9/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/10/g closeparen { $syntype = qqopenparencloseparen; } if openparen$user_profile[16] =~ m/11/g closeparen { $syntype = qqopenparencloseparen; } $synloop++; } and then I put in a:
$row .= qq~
to go back to the rest of the form
---
Now, I can get it to return the first value chosen, but nothing else. (It looks like it's ignoring everything else.) I want it to return ALL the values chosen and poop out a graphic for each.
My SECOND problem is that the form acts as though it's not saving the values. So if I'm editing my profile with this select, and I press "update profile" or whatever it is, and then go back and reload the update profile page, it "unselects" everything I had chosen/saved. Is it not saving the data, not passing the data on, what? ::sighs:: I think I need an array of some sort for it to catch the data in the first place, but I have no idea how to do it / do it and make it work.
(Just FYI, in case it matters: I have eight extra custom fields, the avatar hack, yadda yadda yadda, and everything is just peachy except for when I try to make something into a multiple select.)
Also... Do I need to change anything in any other file (such as the ""customfield1" => 80," in ubb_registration.cgi)? As you can tell, I'm pretty lost at this point.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.