The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
API to find group submissions ? - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: API to find group submissions ? (/showthread.php?tid=122)



API to find group submissions ? - Alexis - Apr 21st, 2009

Hello
i'll try to make sense with my poor english writing,

i have been using FT1 to make electronic booklets to gather data for a medical study.
each ward had a username, was entering its patients, and could find them with a mysql query that looked for that username.
they had a list of 10 submissions and could return to the forms for each patient at anytime and either complete it or modify some data. the data was injected in the same table FT used for that particular form.
FT was very useful to centralise the data and make queries.

as i'm preparing a new study, i wonder if there is a way to use the api to refill forms better than using a mysql query

thanks

alex


RE: API to find group submissions ? - Ben - Apr 22nd, 2009

Hi Alex,

Thanks for the post!

The API actually doesn't have functions for retrieving the raw submission data yet (but it will!), but you can always require() the /global/library.php file and use the core's ft_get_submission_info function - that does what you need. You can find it in /global/code/submissions.php.

But instead, couldn't you do this? (I'm not 100% sure if it fits your needs):
1. create client accounts for each of the wards.
2. create a separate View for each ward. Each View would limit the results to only show submissions within that particular ward. (As such, you will need a "ward" field to be added to your forms in case they don't already have it).
3. Assign each ward to a particular View.

With this in place, they can then log in and update their patient information without seeing any other patients in any other ward.

Would that work, do you think?

- Ben


RE: API to find group submissions ? - Alexis - Apr 23rd, 2009

thanks for your reply

this wouldn't fit my needs as doctors are very tech unwise and need a very explicit interface to see their data

i will look into the libraries,

but the main part of my question was : is there a way to select some submissions according to different criterion, sort them and then access to the data.
maybe it is easier to do it as i used to by using a mysql query


RE: API to find group submissions ? - Ben - Apr 23rd, 2009

Heya,

Yeah, it sounds like perhaps a custom query might be the best thing for now...

Sorry I couldn't be more help.

- Ben


RE: API to find group submissions ? - Alexis - Apr 23rd, 2009

having formtools developed and released to us seems like more than enough help to me.

it's a great tool Smile

thank you!

(Apr 23rd, 2009, 9:57 PM)Ben Wrote: Sorry I couldn't be more help.