• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Design / Function question

wuschel_lux

Member
Hi all,

I need your experts advice for following case.

I want to create a form for parents to register on a site. A Joomla user is also be generated with the juser form plugin and stored. Works fine.
In this register form parents are storing data like address, contact data, .. and also they can add up to 3 kids (first name, last name, birthday).

On a second form they can register to a course, I want to have parents data already available and a dropdown with the children inside, when logged in.

I tried now to get the info in the form but I am stuck to get the info. I managed to get the joomla ID and the user's name with the code in a calc field:
$user =& JFactory::getUser();
$userId = (int) $user->get('id');
return (int) $userId;
But to get the ID from the fabrik table with the parent's data in, I failed as I can not do a SQL query on a calc element from a calc element.

Is there a more elegant or simple way to get the some data of form 1 into form 2? Or have I a complete design problem with this idea.

Thanks for your contribution and help.
BR
 
Have a look at the autofill form plugin.
I can not do a SQL query on a calc element from a calc element.
You can do the complete calc in your 2nd calc element.
If it's only for display you can use a display element (with eval) or maybe a dbjoin with "or concat label".
 
Hi again,
relate on the same topic.

with the database join element I manage to get the first_name of each children in the dropdown, coming from a repeat group. No I try to only showing the kid that belongs to the corresponding parent:
Code:
WHERE {thistable}.parent_id = '2'
works fine, but need to do this flexible adapting to the logged in user, trying following:
Code:
WHERE {thistable}.parent_id = '{fkm_register_course___user_id_raw}'
but I am not sure that he gets the value from the calc field.

Is there a another way to limit the output of the databasejoin?
Thanks for your support.
 
You don't need to calc the user_id of the logged in user, there are placeholders {$my->id}, {$my->name} etc.
 
You don't need to calc the user_id of the logged in user, there are placeholders {$my->id}, {$my->name} etc.

yes and no.

The databasejoin is looking on the repeat table where the parent_id is not the joomla id of the user but from the first table where the user creates his account. So it's not clear for me where to take the value.

e.g. The user creates an account via form 1 and has a form1.id = 5 but get's a joomla.user.id =823. The form1.id is used for the intermediate table for the repeats. Hope I explained it somehow clear?

Thanks
 
something like
WHERE {thistable}.parent_id = (SELECT f.id from first_table f where f.user_id = {$my->id})
(Assuming every user has exactly one entry in first_table)
 
We can't really help with individual site template styling issues like that. The uikit template is applying those border styles, so it's a case of figuring out the selector you need to override their styling.

Do you know how to use Chrome's debug tools, to inspect your page and find what selectors are being applied by what CSS files?

-- hugh
 
Thanks a lot, yes I know it, using the inspect tool of safari and also identified what to eliminate (size="1"), but no glue how to achieve it. I will try to figure it out with the template guy.
Thanks.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top