Forums

Save multiplier as comma separated value

Yudhizth 16 Jan, 2017
Dear all,

I have a form that contains multiplier, but inside multiplier there is another multiplier. The 1st multiplier could save multi record, and the 2nd multiplier could save to each parent multiplier with comma separated value.

table structure
id | satellite | zone
1 | Palapa 1 | zona x, zona y, zona z
1 | Palapa 2 | zona a, zona b, zona c

I still confused to save that multiplier to comma separated value.

One more question,

I already created an example form, but still complicated with the + and x button. I attached the form and sql table.

<script src="//pastebin.com/embed_js/HGeMU39b"></script>
GreyHead 16 Jan, 2017
Hi Yudhizth,

I have never even thought of putting one multiplier inside another. Does that actually work? Do you see useful output if you add a Debugger to the On Submit event.

What exactly do you need to do with this form?

Bob
Yudhizth 16 Jan, 2017
Thank you Bob,
Me too, but that's actually I need. This form is save record about satellite coverage, each satellite could save more that one coverage (zone), just like table structure above, but user could save more than one satellite too. This is my debugger result.

Array
(
    [option] => com_chronoforms5
    [chronoform] => csv-multiplier
    [event] => submit
    [komitmen] => Array
        (
            [0] => Array
                (
                    [nama_satelit] => Palapa1
                    [wilayah] => zone1
                )

            [2] => Array
                (
                    [wilayah] => zone2
                )

            [3] => Array
                (
                    [wilayah] => zone3
                )

            [id_komitmen] => 56
        )

    [button5] => Submit
)

an array 2, and 3 should be merge with the 0, and saving data like this

56 | Palapa 1| zone1,zone2,zone3

So do you have any advice to solved it?
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger