TOPIC:

Userfield of Joomla-User-Management 8 months 1 week ago #252717

  • Topic Author
  • Mister.Miracle
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 136
  • Karma: 1
  • Thanks: 1
Hello,
i have to generate one form, where in a hidden field i have to display one value of one userdefined-extravalue of the usermanagement of joomla.
i hope that you understand, what field i mean :-)

the username i can easy get by a oneline php-code, but i am not able to find something similar how to read and then display the userfields :-(

I can generate the fields by backend - User - Fields and fill in values, but there is no workaround to read it :-(

Is somebody able to explain, how to code it for reading and displaying it to one form field.

Thank you.

Please Log in or Create an account to join the conversation.

Userfield of Joomla-User-Management 8 months 1 week ago #252729

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6926
  • Karma: 3
  • Thanks: 493
Hi,

if I undestood you correctly, then something like this can help to you:
crosstec.org/en/support/online-documenta...and-classicmode.html

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Userfield of Joomla-User-Management 8 months 5 days ago #252923

  • Topic Author
  • Mister.Miracle
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 136
  • Karma: 1
  • Thanks: 1
hello,

thank you for your hint.
i know this possibilty to read the user-data.
I am not able to read the data, that i write to the field, i can create at joomla backend - user - userfield


maybe you can give me a code or a hint to read this values with
  • fieldname: familyname (created in fieldgroup: familydata)

thank you
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by Mister.Miracle. Reason: double text deleted / corrected

Userfield of Joomla-User-Management 8 months 5 days ago #252926

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 664
  • Karma: 4
  • Thanks: 112
Hallo Mister.Miracle,

Im Forum gibt es viele Beispiele, um Daten aus der Datenbank zu extrahieren und sie anzuzeigen.

Um eine korrekte Datenbankabfrage durchzuführen, benötigst du die ID, die deinem Feld vergeben wurde. Diese findest du in den Feldverwaltung (siehe screenshot)

In das Formular, Erweitert -> Mehr Optionen -> Formularteile -> Vor Formular,
Spezial Option auswählen, und den Skript hizufügen:
$this->execPieceByName('ff_InitLib');

$db = JFactory::getDBO();
$userid = JFactory::getUser()->id;
$db->setQuery('SELECT value FROM #__fields_values WHERE field_id="7" AND item_id='. $userid);
$_familyname = $db->loadResult();

ff_setValue('familyname', $_familyname);

In diese Datenbankanfrage, ist die Custom Field ID anzupassen = Deine ID anstatt 7.
Den Namen des Formularfelds "famlyname" mit dem Namen deines Feldes.

Freundliche Grüße,
Eddy


Hello Mister.Miracle,

There are many examples in the forum to extract data from the database and display it.

In order to perform a correct database query, you need the ID that was assigned to your field. You can find it in the field administration (see screenshot).

In the form, Advanced -> More options -> Form parts -> Before form,
select Special option and add the script (code above)…

In this database query, adjust the Custom Field ID = your ID instead of 7.
And the form field name "famlyname" with the name of your field.

Kind regards,
Eddy
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by Eddy.vh.

Userfield of Joomla-User-Management 8 months 2 days ago #252996

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 664
  • Karma: 4
  • Thanks: 112
Hallo,

Ist das die Antwort an deine Frage ? Hat das geholfen ?

LG,
Eddy

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.365 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!