Welcome, Guest
Username: Password: Remember me

TOPIC: auto fill informations in my component

auto fill informations in my component 01 Mar 2014 12:23 #12266

  • cannisar
  • cannisar's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Karma: 0
Many time ago I asked a question.Anythink changed yet? Please help about that.I'm not a professsional as well as you this is the link
The administrator has disabled public write access.

auto fill informations in my component 01 Mar 2014 14:47 #12268

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
If it is about user plugin : Not handled yet. Please refers to the Joomla tutorials.

If you are trying to create a dynamic population of datas, then use Javascript, but it must call an invisible AJAX call. Very interresting !
All the Ajax part is easily handlable with the last component functionabilities. But you must know a little bit about javascript to do it.

Can you post HERE your precise question again ?
Coding is now a piece of cake
The administrator has disabled public write access.

auto fill informations in my component 01 Mar 2014 15:24 #12271

  • cannisar
  • cannisar's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Karma: 0
Question are 2.
1-) I want select one field others auto fill by database.
For example: ı have a database table called "users."
with a combo-box (or search box ) select user name - example John Doe
all other fields auto fill ( John Doe's data )
like one field combo-box for selection, others flypage..
İs it possible?
2-) I want print page by a print button. How can I do ?
About questions;

Think about a farm component.There are many farmer/workers.We have a tablo called "workers" .Also we have a lot of information about workers and we add their information to workers table by a form.its ok.Thats simple.
We need a worker personel information card.So we must choose a worker by name or worker number and all information about that worker comes from the tables.
For example John Doe is a worker. We added all information about the worker( age, birthday,health ext.) to workers table. When we select the John Doe from the workers table by com-box or search-box ( not importent what) we must see all information about him like a worker personel information card.
Printing:
1-) We must have a "Print" button for printing by writer one page .This can print only one person's information card.
2-) More difficult think about printig:
We must have 2 print button. "Print" , "Print all"
a) One of them "Print"; can print only one person's information card.
b-)Other "print all persons card" ; prints each information card in a page automaticly.The writer must print each persons information card in a page.



..............
Example


All workers doesn't register for site(joomla).
it's mostly like a management tool in backend/ admininistrator. %10 information in fronted %90 information about workers in backend. So how can I do that
?

important= print id second plan.now first get informations about selected or searched user/worker.Thanks
The administrator has disabled public write access.

auto fill informations in my component 04 Mar 2014 21:14 #12277

  • comeng
  • comeng's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
Hi,

Have you solved your problem about auto fill other fields?
I have the same problem, have 2 combo box and i want to fill the second combo box after from the first one item selected.
For example:
I have users and users have many addresses
The first combo includes users, i select one and the second combo has only addresses for selected user...
How to do it?

thanks
The administrator has disabled public write access.

auto fill informations in my component 05 Mar 2014 00:02 #12278

  • cannisar
  • cannisar's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Karma: 0
no ı haven't...ı'm waiting for it too.. :(
The administrator has disabled public write access.

auto fill informations in my component 06 Mar 2014 13:14 #12283

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I am not understanding the link between users and workers. (is it a one-to-one ?)

My suggestion to make it simple, if worker is a FK

From the worker list, create a link to this page you show here.
This page receive the worker ID as a paramerer in url.
If this worker is given in url, then the worker item must be loaded and will populate the form.

1. You should have filter_worker available if your item is containing FK to work.
If not, you must add it.

2. In the item model, in loadFormData(), add few lines.
If the worker ID is defined, then call the worker model and load the datas with a unique call.
Populate all related fields there.

This could be done with a joining, but when you create a new item, there is no SQL select call.

Reading you again, I can see maybe you want something else...
Are you saying you want a form which is simply loading the datas but with a searching header tool ?
In that case, the more simple is to create a module, or to copy few lines to instance such menu tool which change the form page.

Then, do you want the page to refresh ?
If you want only to populate the fields dynamically, you need AJAX.

Then about printing, you need to create a new special report. Based on item, or based on list (as entry point), then you can access infinite datas.
Is it PDF ?
For PDF, if you want to print all, you may encounter memory problems with some PDF libraries. It is consuming a lot of memory, so forget the idea of printing all because if you do not restrict and try the limit, then one day somebody will call you for 'memory limit problem'... good to have it in mind.
This is all I can say for this topic.

I can help you but is not included in the free support. E mail me if you need a special development.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.066 seconds

Get Started