Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Auto Fill Text

  • martynf
  • martynf
  • OFFLINE
  • Posts: 18
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #258409 by martynf
Auto Fill Text was created by martynf
I have a query based drop down to select certain users who meet certain criteria.
From that I wish to populate another field with a certain value from their comprofiler table.
So for example I populate the dropdown with "userx" then I would like another field to be populated with "userx_member_number"

Is this possible please and how?

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

  • heyai
  • heyai
  • OFFLINE
  • Posts: 324
  • Thanks: 79
  • Karma: 24
9 years 10 months ago - 9 years 10 months ago #258421 by heyai
Replied by heyai on topic Auto Fill Text
Sounds like you could just use substitutions in a new text field.
[fieldname of your userx query field][user_id] might do the trick. Otherwise see www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!
Last edit: 9 years 10 months ago by heyai.

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

  • martynf
  • martynf
  • OFFLINE
  • Posts: 18
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #258429 by martynf
Replied by martynf on topic Auto Fill Text
Hi, sorry my explanation was not full enough, the substitution works fine, however what I really need to do is then store that value in the table of the user.

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

  • martynf
  • martynf
  • OFFLINE
  • Posts: 18
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #258480 by martynf
Replied by martynf on topic Auto Fill Text
Hi, Thanks again for your help, I think I didn´t explain too well what I am trying to achieve.
So the user "userx" has to be assigned to a teacher, which is easily done using a query dropdown.
The teacher also has a "teacher number" which is independent of the joomla id and I also need to display and store this on the "userx" comprofiler table, so when I select the teacher it will automatically do this.

Thanks in advance for any help you can give

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 years 10 months ago #258529 by krileon
Replied by krileon on topic Auto Fill Text
The only reason for it to be stored is if you need to search on it. If you don't need to search on it you can use a CB Query Field to pull its display into their profile.

If you need it searchable then create the query field to pull its display then have a text field that's set to read only. Next use CB Auto Actions on the after profile update and after registration triggers (frontend and backend) to update your text field with the value of the query field by substituting in the query field value.

Alternatively query action would also work to pull the value and update their row with it. Just depends on which you're more comfortable with, both will require writing some SQL.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum