ChronoForms joomla users

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
sillesco 31 Jan, 2014
Where do I enter the code?
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
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
sillesco 04 Feb, 2014
how to create a database, if necessary for this task
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
sillesco 04 Feb, 2014
Hi,


Not work.



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

[attachment=1]sin titulo 2.png[/attachment]
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
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.