Hello.
Joomla 2.5.27 and VM 2 (2.6.14)
I try to split index.php?option=com_virtuemart&view=user&layout=edit form to two forms, one with simple data like username name password email AND WHAT IS IMPORTANT three custom userfields checkbox (three of them), and the seckond form with company and any other fileds of 'account' column in _virtuemart_userfields in data base (assuming that user edit form is generated by '1's from that column. or maybe I'm wrong? so correct me ).
Why?
I try to make another tab in index.php?option=com_virtuemart&view=user&layout=edit with basic datas with name username... and remove that data from existing tab 'Shopper Information' (not with css only, but with css will be difficoult too, no id's to hang on)
I've already created tab called COM_VIRTUEMART_USER_SIMPLE_DATA (not translated string but that's not important) but I cant split that form (user edit of course) to things looks like that (i prepared that screens in browser :) )
(http://esteart.home.pl/Zrzutekranu(27).png)
(http://esteart.home.pl/Zrzutekranu(30).png)
('select an option' is not what it should be but not the point)
the site is not style with css for meny things yet but that is not the point too.
I've found something on forum , but that was a long time ago http://forum.virtuemart.net/index.php?topic=88403.0 (http://forum.virtuemart.net/index.php?topic=88403.0) and actually I don't underdtand what he was trying to say, but he was saying wright things :) .
How to split that form, to looks like that on screen (more or less - the problrm is in splitting that thing :) )
Thanks in advance... but this time I don't know if I answer myself as usual :) .
Thanks.
As he says it takes some coding skills - the fields are just looped thru and displayed
My thought would be two separate loops with filtering to get just the fields you want on the tab you want
Indeed, but they are lupped outside views (to do things in overrides instead of core hacking) so I need grab that form before it displays (somehow - I don't know how, maybe in the evening I try), split it and replace the values of $tabarray in edit.php view file by new values. If I think correct. Hmm. I will have a rough night :)
but you can always call a model outside of the view i.e. directly in the template -- (e.g. look how say the vm products module is done)
I made it :)
In view files by grabbing changing and replacying $this->userFields['fields'] by my own new array, all about I will write tommorow for now just photos
(http://esteart.home.pl/Zrzutekranu(34).png)
(http://esteart.home.pl/Zrzutekranu(35).png)
Some (5) newly created files some looping nothing special but looks like I wish to :)
I've split that forms but they still behave like a single one (they are separated but they validating each other - but that's ok in my case - maybe I will work on that later)
The answer is complicated.
I created for that few files, some other are modyfied but in view only.