inline and parameter [Solved]

tibi38 25 Dec, 2011
Dear,
I like to add a paramter for the inline-use of chronoforms like
{chronoforms}form1&token=3{/chronoforms}
to use the data retrieve as described in your tutorial.
How can I do it, because the example above doesn't work.
Best regards
GreyHead 27 Dec, 2011
Hi tibi38,

Unless Max has added it in the latest release this feature doesn't exist in ChronoForms. You can though grab a parameter from the page URL if that helps?

Bob
Max_admin 30 Dec, 2011
No, this has not been added, you can add the "&token=3" to the article URL and the form will grab it.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tibi38 07 Jan, 2012
Thanks for the information.
And also a Happy New Year.

My problem is, that I like to use the Joomla User-ID for grabbing in the database and also to include the for in a joomla page. So I have only the way to modify the menu-source (where and not a good idea for teh future) or to modify your code (maybe a better, but also not a good idea). Is there any other way? What is your proposal or your experience for that?
Best regards
GreyHead 07 Jan, 2012
Hi tibi38,

You can always get the current user id from the Joomal User object. This adds it to the form data so that you can use it in the same way as any other form data.
<?php
$user =& JFactory::getUser();
$form->data['user_id'] = $user->id;
?>
tibi38 07 Jan, 2012
Dear Greyhead,
I know how to get the user-id. I like to use the user-id to get a record for a form in the same way how you explain it for the token in the CFV4_db_record_loader document.
best regards
GreyHead 07 Jan, 2012
Hi Thomas,

I thik you just need to put the parameter name e.g. user_id in the correct box in the DB Record Loader.

Bob
tibi38 07 Jan, 2012
Dear Greyhead,
I used it in this way like shown in the attachment. But it doesn't load the record stored in the database.
Bets regards
GreyHead 07 Jan, 2012
Hi tibi38,

And do you have the code snippet to add it to the Form Data in a Custom Code action before the DB Record Loader action?

Bob
tibi38 07 Jan, 2012
Thanks Greyhead,
the point was the missing Custom Code which I forgot.
Thanks a lot.
fkaram65 11 Feb, 2012
HI

Can you share what this custom code action is? Is it just calling out to that particular table.
tibi38 12 Feb, 2012
It is just filling the content of user_id ($form->data['user_id'] = ....)
fkaram65 12 Feb, 2012
i am sorry i am new. where do you exactly place this form data call out. is it in the custom code section. And what comes after the equal sign the actual url with the ¶meter call?
GreyHead 12 Feb, 2012
Hi fkaram65,

Where you place he code depends on what you are trying to do with it.

Yes, the format for passing a value in a URL is &name=value

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