JFactory and BreezingForms

Neu bei Joomla? Allgemeine Fragen über Joomla!

Moderator: Sisko1990

Forum rules
Forumregeln
Post Reply
leovee
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Mar 15, 2012 10:50 pm

JFactory and BreezingForms

Post by leovee » Thu Mar 15, 2012 11:14 pm

When making a form using BreezingForms, I use the following snippet in the value field of a form-field to get the user-name displayed in the field:

Code: Select all

<?php $user = &JFactory::getUser(); return $user->get('name'); ?>
This is a well-known solution, suggested in many forums.
But for some odd reason, the field displays the entire code inside the field, including the php-tags, instead of filling the field with the resulting name. Somehow the PHP-tags don't seem to be resolved.
It must be something pretty simple I'm overlooking.

Can someone help out?
Thnx!

MrDamage
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 180
Joined: Tue Mar 07, 2006 6:53 pm
Contact:

Re: JFactory and BreezingForms

Post by MrDamage » Thu Mar 22, 2012 5:25 pm

In Quickmode try

Code: Select all

<?php return JFactory::getUser()->get('name'); ?>
In Easymode you need additional PHP code.

Details:
http://crosstec.de/support/index.php?pi ... ient&id=28

btw: This is the german forum.

leovee
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Mar 15, 2012 10:50 pm

Re: JFactory and BreezingForms

Post by leovee » Thu Mar 22, 2012 5:44 pm

Already tried the suggested EasyMode solution, also pointed out in the crosstec forum. No luck.
the init-script (put in the library with type=form-init) is showing up in Form-settings as valid for this form, but does not fill the fields at init-time. Same when entered as custum script in Form-settings.


Post Reply

Return to “Allgemeine Fragen”