Forums

PHP function in V7

Ron 30 Sep, 2020
Hello

I have started using the V7. But I do not understand whether it is my error or it is a bug ? I have a code for the PHP Action as below;
$user = JFactory::getUser();
require_once( JPATH_ROOT . DS . 'components' . DS . 'prices' . DS . 'users' . DS . 'user.php' );
return $values['email'];
It gets me the value that I need. I have the next PHP function as below just like the above:
$user = JFactory::getUser();
require_once( JPATH_ROOT . DS . 'components' . DS . 'prices' . DS . 'users' . DS . 'user.php' );
return $values['company'];
Now here I get the return as NULL. I have six of these codes that I need to get the value only the first action gives me the return all other give me a NULL return...

I do not understand if it is a bug or I am making a mistake.

Please help..
Ron 30 Sep, 2020
Max_admin 01 Oct, 2020
instead of "return", use "echo", does it show the values ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Ron 01 Oct, 2020
I tried "echo" but no values are shown... I did a clean install on a basic latest 3.21 Joomla. the result is the same...
Max_admin 01 Oct, 2020
what happens when you return constants instead of your variable, like 1, 2, 3..etc ? same issue ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Ron 01 Oct, 2020
Let me try... Just a moment
Ron 01 Oct, 2020
Max.. Thanks for the help. You have the login details.. Could you login to the admin area and see it please.. It seems to be the same
Max_admin 20 Oct, 2020
I could not produce this here, adding PHP actions returns the correct values!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Ron 20 Oct, 2020
Max.

If you have a few PHP Actions getting values from a dynamic Array only the first two actions will work. Others will give a NULL value.
Max_admin 03 Nov, 2020
Hi Ronn,

If you are able to create a demo form with 3 or more PHP actions getting a value from a dynamic array generated with PHP too (so that I can run the form) then please attach it here so I can test it!

Thank you!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.