ChronoForms joomla users

si sillesco 26 Jan, 2014
hi

I need the form to be sent to my email tell me about the joomla user name of the writer.

I have thought about creating a field for the visitor tell me your own user, the problem is that they could fool me. I need it done automatically.

thanks
Gr GreyHead 31 Jan, 2014
Hi sillesco,

The FAQ gives you suggestions about where to put the code but it does depend on what you need to do in your form.

Bob
si sillesco 04 Feb, 2014
Hello. I use google translator and I understand the operation very difficult.

I'm doing "Registered and logged in" but do not understand or does not work. I created a "custom element", I clicked on setting and in the section of code I pasted this:

<? php 
$ user = & JFactory :: getUser (); 
> 


It did not work, I changed it to this:

<? php 
$ user = & JFactory :: getUser (); 
$ form-> data ['user_id'] = $ user-> id; 
> 


Neither has worked. not.

As much as I read the FAQ I fail to understand, what I do? How to create a database?

Thanks for everything
si sillesco 04 Feb, 2014
how to create a database, if necessary for this task
Gr GreyHead 04 Feb, 2014
Hi sillesco,

The code you posted here is badly broken - that may be because you cut and pasted it. The first snippet will do nothing useful. The second should be this
<?php 
$user = & JFactory::getUser(); 
$form->data['user_id'] = $user->id; 
?>

You can create a database table using the Create Table icon in the ChronoForms toolbar.

Bob
si sillesco 04 Feb, 2014
Hi,


Not work.



[attachment=0]sin titulo 1.png[/attachment]

[attachment=1]sin titulo 2.png[/attachment]
Gr GreyHead 04 Feb, 2014
Hi sillesco,

The code looks good - but it doesn't do anything there.

Please add it to a Custom Code action in the form On Submit event.

Bob
si sillesco 04 Feb, 2014
Hi

Not work


[attachment=0]Sin título 1.png[/attachment]



[attachment=1]Sin título 2.png[/attachment]
This topic is locked and no more replies can be posted.