Using savedata, I can only save individual fields with their values. If I would use [session savedata "[(list page='group.whatever' fmt=csv)]"]
Then I would get the following data: Mark: 3.00 Jan: 2.00 Boris: 0.00 However, I want to save a LIST of fieldnames and a LIST of fieldvalues. names: Mark,Jan,Boris values: 3.00,2.00,0.00 I was not absolutely necessary for me to save the values like this, so I saved them as "field: value" info variables, which turned out to be much more handy than the original idea of lists. [form js=validate] ... [hidden data] [session savedata data] [form] the "js=validate" is defined as follows in config.php: $BOLTformJs ['validate'] = "onsubmit=\"return validate()\""; This fires a javascript before submitting the form. This javascript function creates the list I need, and voila, everything is saved! On Jul 25, 2:24 am, The Editor <[email protected]> wrote: > If I understand you right, you have > > Mark > Jan > Boris > > on page group.whatever, and you want to be able to take those names > and convert them into a CSV list you can save as a data value? Is that > correct? > > How about [(list page="group.whatever" fmt=csv)] > > If I missed the situation, or you need more help let me know. I'm not > sure I followed what you are asking 100% but looks like you are doing > some really valuable work here. I can see lot's of applications. Let > me know how it goes. > > Cheers > Dan > > On Tue, Jul 21, 2009 at 9:27 PM, Mark > > > > Marijnissen<[email protected]> wrote: > > > I have generated some textboxes from a list, and I want to save the > > value the user puts in. Just like saving data-variables (only they are > > generated from {data} instead of list.) > > > My list looks likes this: > > ----------------- > > [x] Mark [3,00] > > [_] Jan [2,00] > > [_] Boris [0,00] > > ----------------- > > There is a checkbox, a label, and a textbox. This is the code: > > > ---------------------- > > [(list page="group.whatever" template="[r][c][check name={+p} label= > > {+p}][c][text x{+p}]")] > > ----------------------- > > > As you can see, the textboxed are named "x{+p}" which amounts to > > xmark, xJan, xBoris, etc. How do I save these values in a CSV list as > > a Datavar? > > > I tried several things, and I could not figure out how the Data action > > works. After a while i noticted something weird: BoltWire does NOT > > recognice variables like xJan, xMark, etc.. I think this is because > > there are dynamically generated. > > > Does anyone know a solution to this? > > > thanks! > > cheers, > > > Mark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/boltwire?hl=en -~----------~----~----~----~------~----~------~--~---
