Welcome, Guest
Username: Password: Remember me

TOPIC: Form Auto fill

Form Auto fill 31 Dec 2012 11:56 #6310

  • cannisar
  • cannisar's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Karma: 0
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 ?
Last Edit: 31 Dec 2012 17:39 by cannisar.
The administrator has disabled public write access.

Re: Form Auto fill 02 Jan 2013 19:07 #6322

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
OK, I think I understand what you are asking...

You want to lookup a user via a dropdown then present that user's information on the page with a print button, right?

First, a question or 2:
  1. Is this your real scenario or simplified for the purpose of asking the question?
  2. If it is in fact the correct scenario, is your users table you refer to the core joomla users table or are you wishing to create join table -> joomla core users table in which you store additional information about the users?
Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Form Auto fill 02 Jan 2013 19:47 #6323

  • cannisar
  • cannisar's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Karma: 0
Yes that's true. 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.
The administrator has disabled public write access.

Re: Form Auto fill 02 Jan 2013 21:13 #6324

  • cannisar
  • cannisar's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Karma: 0
Example
Last Edit: 02 Jan 2013 21:15 by cannisar.
The administrator has disabled public write access.

Re: Form Auto fill 02 Jan 2013 21:24 #6325

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Ok,

Based on what you are trying to achieve, I believe that the cleanest way to approach this would be with a combination of a Cook built component and a custom profile plugin to extend the core users table.

Why???
Well, for sure, Cook can build the whole thing as a component by adding all of your desired fields to your workers table and relating core joomla users by adding a Joomla User wizard to your table. From there, you relate your other objects/entities - timesheets, rota, holidays or whatever you want - to your workers by adding a Foreign Key field type to their tables.

However, it will involve far less 'custom' coding in many respects to separate what would naturally seem to fit the purpose of profile data that you'll almost always store for all users (or users of a specific type) and store any data that will likely vary in size, quantity and/or frequency per user (or worker) in your component.

Both routes have been discussed in some depth on the forum... These should get you started;
Plugin in addition to component:
  • www.j-cook.pro/forum/7-design-your-appli...-with-relations#5896
  • j-cook.pro/forum/9-coding-inside-your-co...s-from-2-params#5205
  • Component only (Limiting/filtering certain views & layouts to the 'creator' with User/author wizard)
  • www.j-cook.pro/forum/7-design-your-appli...-with-relations#5896]
  • www.j-cook.pro/forum/7-design-your-appli...ecords-without-admin
  • hope it helps,

    Gez
    Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
    Last Edit: 02 Jan 2013 21:26 by JoomGuy.
    The administrator has disabled public write access.

    Re: Form Auto fill 02 Jan 2013 22:07 #6326

    • cannisar
    • cannisar's Avatar
    • Offline
    • Junior Member
    • Posts: 21
    • Karma: 0
    workers doesn't register for site(joomla). sure we don't want that too. we don't need acl or users in joomla.
    Wee all need call one data from table and other fields auto fills but how? :(
    many of sended links by you ı have read already. :(it's more more complex. I confused :(
    Auto Complete by Jquery (remote data source)
    Auto Complete by Jquery (remote data source) in new/fresh page
    Auto complete api
    possible way? How?
    Last Edit: 02 Jan 2013 22:25 by cannisar.
    The administrator has disabled public write access.

    Re: Form Auto fill 02 Jan 2013 22:17 #6327

    • cannisar
    • cannisar's Avatar
    • Offline
    • Junior Member
    • Posts: 21
    • Karma: 0
    Actually I see search button (in filters) in Backend Layout item page .it's not passive.But in same page the filters in bricks passive :(
    The administrator has disabled public write access.

    Re: Form Auto fill 02 Jan 2013 22:23 #6328

    • JoomGuy
    • JoomGuy's Avatar
    • Offline
    • Moderator
    • Joomla Enthusiast, Lover of Cooking
    • Posts: 1115
    • Thank you received: 195
    • Karma: 64
    So none of the workers will be users? I mean, it's a management tool?

    You should check out the tutorial here: www.j-cook.pro/docs/tutorials
    In particular the section on JDom widget. Although not directly related, it will give you an idea of how to create a custom type (display or input) that I'm sure you'll be able to translate for your purposes.

    Hope it helps.

    G
    Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
    The administrator has disabled public write access.
    The following user(s) said Thank You: cannisar

    Re: Form Auto fill 02 Jan 2013 22:28 #6329

    • cannisar
    • cannisar's Avatar
    • Offline
    • Junior Member
    • Posts: 21
    • Karma: 0
    Yes it's a management tool.Only in backend/ admininistrator.
    Ok I will look..
    Last Edit: 02 Jan 2013 22:29 by cannisar.
    The administrator has disabled public write access.

    Re: Form Auto fill 02 Jan 2013 22:35 #6330

    • JoomGuy
    • JoomGuy's Avatar
    • Offline
    • Moderator
    • Joomla Enthusiast, Lover of Cooking
    • Posts: 1115
    • Thank you received: 195
    • Karma: 64
    Great! By the way, there's also a section on creating a custom task that will help with creating a print button.

    G
    Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
    The administrator has disabled public write access.
    The following user(s) said Thank You: cannisar

    Re: Form Auto fill 02 Jan 2013 22:42 #6331

    • cannisar
    • cannisar's Avatar
    • Offline
    • Junior Member
    • Posts: 21
    • Karma: 0
    I hope so :) Thanks for your help my friend. for now.I think I need your help always :) +1 K
    Last Edit: 02 Jan 2013 22:43 by cannisar.
    The administrator has disabled public write access.

    Re: Form Auto fill 02 Jan 2013 22:49 #6332

    • JoomGuy
    • JoomGuy's Avatar
    • Offline
    • Moderator
    • Joomla Enthusiast, Lover of Cooking
    • Posts: 1115
    • Thank you received: 195
    • Karma: 64
    No probs!

    Good luck. Let us know if you need anything!

    G
    Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
    The administrator has disabled public write access.
    Time to create page: 0.088 seconds

    Get Started