Forums

Drag existing fields to a container

NickOg 25 Jul, 2012
Having just discovered the power of containers it would be very useful to be able to drag existing fields into a container rather than to recreate them from scratch.

Nick
Max_admin 28 Jul, 2012
Hi Nick,

Agree, sometimes I need this!🙂

But making the dragged fields dragable AND sortable..etc may result in cross browser and performance issues, I will try to think about some solution to this problem.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
NickOg 28 Jul, 2012
Thanks Max -

I hadn't thought of sortable as a need - since one can drag existing fields around.

I am still amazed at the power of the package as a whole.

Nick
grafik 12 Mar, 2013
i would like to have this too. 😀

any new infos about this?

my thoughts about how to do that:
maybe with an additional button => "send into / drop out of: a existing container" or a dragbutton that only can drag into or out of a existing hierarchy. or a parameter "parent item" like menu-items have.

nearly the same i would like to have for events too:
drag an a action form one event to a other, drag them into/out of a success/false action.
and i would like to drag & if possible rename the events.

hopefully greetings out of Switzerland
grafik
GreyHead 12 Mar, 2013
Hi grafik,

I don't know where Max has got to with his thinking about this.

If you have a 'major' problem it is possible to move elements around by editing the WizardCode column in the form record in the database table. It's not too difficult once you see the structure, which is nested arrays of elements. But not for the inexperienced or faint-hearted either. Make sure that you backup first.

Bob
grafik 13 Mar, 2013

editing the WizardCode column in the form record in the database table. It's not too difficult


😀 you are right, it was easier than i first thought, that it will be.

Tipp to other users: (that knows a litte bit mysql and code)
there is a "parameter" inside wizardcode column in the form record in the database table: 'container_id' => 'ID'
just replace ID (it is 0 when it is inside no container before, else it is the containerID)
with the "new" containerID that should contain the element you edit.
make a backup, and never change container_id of the element with ID 0 (first created element by wizard) else it break your form,
and dont create other loops ;-) like container1:container_id=>2, container2:container_id=>1

This just explain/expend what Bob say at his previous post.

To Bob / Max:
just insert this parameter into the wizard, and i have what i wish. 8)
best would be a dropdown that only show possible Values:
(Maincontainer, and container except the one who is edited, and containers that are inside the edited container.)
And change the ID of first created element by wizard to 1 (make a maincontainer field that is hidden with ID 0)

Kind Regards
grafik
GreyHead 13 Mar, 2013
Hi grafik,

Great to hear you got it to work on your form :-)

One more footnote: after editing the database record you may need to open and re-save the form in the ChronoForms Forms Manager to update other parts of the form record. I'm not 100% sure that this is necessary but it will do no harm.

Bob
This topic is locked and no more replies can be posted.