Forums

How to update v3 forms to v4?

camerata 16 Oct, 2012
I have some v3 forms with custom code including multipage and multilanguage settings for plugins. How to import or make as new quickly these forms to v4?
I installed v4 to testing and it seems to be very different and I don´t find plugins...

Thanks in advance.
GreyHead 16 Oct, 2012
Hi Camerata,

Please see this FAQ - I'm afraid that there is no automatic upgrade :-(

Plug-ins in ChronoForms v3 have been replaced by Actions in CFV4. The video in this FAQ will give you a first idea of how it works.

Bob
camerata 16 Oct, 2012
Thanks, Bob.
I will try to make the new forms with copy/paste code and other new features. I will be not easy with many forms...

Only a question more. I will need to change/adapte my custom code?
My special interest is about params and values passing from one to next pages and multilanguage key words.
GreyHead 16 Oct, 2012
Hi camerata,

Some of your custom code will need to be changed to work with CFv4 or Joomla! 2.5. The biggest change is that ChronoForms now uses it's own array $form->data to store the form data so you have to check any code that uses the JRequest methods to make sure that it is still referring to the correct value.

In Joomla! the User Group and permissions code has changed so again anything that uses this need to be carefully checked.

I think that the language marks and translation strings should copy and paste over to the multi-language actions in the new version OK.

Bob
camerata 16 Oct, 2012
Bob: I understand.

The biggest change is that ChronoForms now uses it's own array $form->data to store the form data so you have to check any code that uses the JRequest methods to make sure that it is still referring to the correct value.


Is there any tutorial or could you a brief example of JReguest methods moving to $form->data?
I will review all custom code but I would like to know what to find before.

Thanks in advance.
camerata 16 Oct, 2012
A question about actions.
Do I need to create the new forms via Wizard or as "New" at form manager?

I need to have access to the actions for the multilanguage features but I can't since I created the form as "New" (no wizard) and the html code from old v3 form,
GreyHead 16 Oct, 2012
Hi camerata,

You can still open the Wizard link to add actions to your forms even though they were created with the 'New' icon. You won't be able to add new Elements in the Preview box though.

It's hard to give a general example about the use of $form->data. My best advice it to keep an eye open for any instances of JRequest::setVar('xx') = 'yy'; and replace those with $form->data['xx'] = 'yy';

Bob
camerata 16 Oct, 2012
Ok, Bob. It's clear.
For my first updated form I don't need $form->data.

All seems to be correct but the form doesn't work (nothing is displayed). I think something from the custom code must be updated now to Joomla 2.5.

My old form uses some Joomla 1.5 core function values as follow:

$user =& JFactory::getUser();
$db =& JFactory::getDBO();
camerata 17 Oct, 2012
You're riight, Bob.
Now the form works fine. Thank you!

I will try to update all forms.
This topic is locked and no more replies can be posted.