The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
|
Client name field - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Client name field (/showthread.php?tid=1902) Pages:
1
2
|
Client name field - kokorase - Feb 15th, 2012 Hi again Is there anyway to make a field that automatically add the currently logged on client name ? And is there anyway to increase the font size of the text of the form ?? Thanks in advance RE: Client name field - Ben - Feb 17th, 2012 Hi Kokorase, Quote:Is there anyway to make a field that automatically add the currently logged on client name ?How would you like this to work, exactly? So when a client account logs in and updates or adds a record, it would store their name? Quote:And is there anyway to increase the font size of the text of the form ??You can, but you'd need to edit the CSS for whatever theme you're using: or even develop your own theme to make those changes. - Ben RE: Client name field - kokorase - Feb 19th, 2012 Hi Ben, Thanks alot for replying " How would you like this to work, exactly? So when a client account logs in and updates or adds a record, it would store their name? " I want this to work when the client adds record .. I'm using the internal form .. so i make it shows the creation date and IP .. i want it to show the name of the client that added this record too . And for enlarging font .... I'm using the default theme .. but i don't know which CSS file to edit .. can you tell me .. Thanks alot RE: Client name field - kokorase - Feb 23rd, 2012 Up .. still waiting for answer RE: Client name field - Ben - Feb 24th, 2012 Heya, Sorry for the wait. Just travelling at the moment, and getting decent (and affordable) internet is surprising tricky. For the font size, check out this file: /themes/default/css/general.css - look at line 16 which defines the general styles for many elements, including the font size. For the other thing, I'll take a look at this today. It'll take some custom code with the Submission Pre-Parser module to do it. - Ben RE: Client name field - Ben - Feb 24th, 2012 Hi kokorase, Here's how to log the name of the client who created the submissions. 1. Install the Hooks Manager module: http://modules.formtools.org/hooks_manager/ 2. In your form, create a new field called something like "Created By"; set it to a textbox, with database size "Medium" (256 chars), and give it database column name "created_by". All this is done on the Edit Form -> Fields tab. 3. Go to the Hooks Manager module and create a new rule with the following info: Rule Name: "Created By" Priority: 50 Hook Type: Code Hook Code Hook: ft_create_blank_submission, end PHP Code: PHP Code: global $g_table_prefix; And that's it! Now, whenever a client (or the admin, for that matter) creates a new submission through the Form Tools interface, it will pull the name of the account (first + last name) and store it in the new "created_by" database column. To have that information show up in the interface, you'll need to add the field to one of your Views. Hope this helps! - Ben RE: Client name field - kokorase - Feb 25th, 2012 Both solutions have worked out perfectly Thanks alot for your help Ben .. I won't be able to thank you enough for that .... you are truly a life savior RE: Client name field - renobird - Feb 25th, 2012 Nice! This looks like it will accomplish what I was after here: http://forums.formtools.org/showthread.php?tid=1913 I can use the "created by" field to test against in the Client Map Filters. I'll report back if that works as expected. RE: Client name field - cvoliveira - Feb 28th, 2012 Hi Ben, This is very usefull, however I would like to ask if it's possible to do the same with field 'company_name' that is located in a different table (account_settings). I tried to create a hook rule for that but doesn't work. (Feb 24th, 2012, 6:40 PM)Ben Wrote: Hi kokorase, RE: Client name field - andy_12-12 - Sep 24th, 2012 (Feb 24th, 2012, 6:40 PM)Ben Wrote: Hi kokorase, Hi I have tried this suggestion, and checked my implementation of it, and for me it doesn't work. Please could you suggest where I might be going wrong or how else I could store the username each time a new record gets created. |