1
mackingspain
formulize - parsing a selectbox array

greetings -

I'm using Formulize and Pageworks and am having a really difficult time parsing a selectbox array. Here's what I'm trying to do, in a nutshell -

* there is a table of cities called metro_areas

* when users register, they check as many cities as they like on a selectbox in the profile/registration form. ther city list is linked to the one in the metro_areas table so that the names are standardized.

* I would like to create a customized report that shows upcoming events in any of the cities the users selected. I have a general sense of how this would be done but the stumbling block is that the city list is an array and I'm unable to extract the values for each user in a format that I can filter on.

I'm aware that cities selected are referred to in an entry in the ele_value field of the xoops_formulize_form table. the references are in a format that resembles this:

2#*=:*Metro Area#*=:*15[=*9*:11[=*9*:13

but I'm hoping I can stick with getData and not have to do SQL calls as a workaround. The closest I have come to getting to the personalized list of city names is this -

$uid = $xoopsUser->getVar('uid');
$zones = getData("",1,"uid/**/$uid");
//and then
print_r($zones);

which gives me all of the profile (form #1) data for the logged-in user, including the resolved names of cities they selected. However, I'm still looking for the Holy Grail - a parsed set of city names that I can assign to variables and pass to a filter. The filter is a comparison of the user-selected cities and the event cities, which are from the same master cities table.

It seems like there's a way to do this with getData, but I am too thick/inexperienced to figure it out from the examples in the manual, and believe me, I have been trying all day. Has anyone out there done something similar?

2
jegelstaff
Re: formulize - parsing a selectbox array

FYI: I have put a detailed reply here on dev.xoops.org:

http://dev.xoops.org/modules/xfmod/forum/forum.php?thread_id=2958&forum_id=746

--Julian
Technical Architect - Freeform Solutions
Formulize - custom registration forms, ad hoc forms and reports

Login

Who's Online

421 user(s) are online (373 user(s) are browsing Support Forums)


Members: 0


Guests: 421


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits