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



Form Tools
2 Questions - 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: 2 Questions (/showthread.php?tid=163)



2 Questions - codezpecg - May 22nd, 2009

First of all great tool I love it

I am trying to see if I can do something with these forms:

1. I am creating a multi page form, where user enters his information, I have got this to work perfect, now what I want to do is before user submits the form to have an option to ADD Another user, for example

I fill out the form with all my info and now before I submit I can click Add User and then fill in SAME info for another user, then when I submit the form both users get submitted under same ID but seperate. Hope this makes sense.

2. Is it possible to add in USER MENU links to specific views? For example when client logs in right side menu under Forms you would have submenus like Pending - Status and so on

Thanks

Code


RE: 2 Questions - Ben - May 23rd, 2009

Hi Code,

Thanks for the post!

1. It may be possible, but it rather depends on your data set (and if I understand it properly!). Just to recap the scenario, to make sure we're on the same page: imagine your form contained 10 fields, then the user clicked "Add User" and another 10 fields appeared. These new 10 fields would be the same as the original 10.

In order for all this information to appear with a single ID, the form would need to have all 20 fields set up.

But, would you maybe want ANOTHER "Add User" button to appear at the end of the 20th field? If so, you really need to store the groups of 10 submissions separately with different IDs and then think about grouping them somehow. Off the top of my head, this is certainly possible with the existing code, but you'll need to use the Submission Pre-Parser module.

What you could do is this: in Form Tools add the 10 fields for a single person. Then add a new one called "User Group ID" or something. Next, in your form, keep track of the number of users being added (either via JS or PHP). Finally, when the user submits the content, you'll need to loop through the results and submit each one, one-by-one. In each submission being added, pass the same User Group ID, e.g. a unix date time. That information can then be used in Form Tools for searches to retrieve all submissions added at that one time.

Anyway, probably too much info! Just wanted to let you know that it's probably possible if you're willing to put in a little legwork.

Quote:2. Is it possible to add in USER MENU links to specific views? For example when client logs in right side menu under Forms you would have submenus like Pending - Status and so on

Could this be done by creating Views for Pending, Complete etc.? That would be the simplest route. Otherwise, you'll need to look into developing a separate module, I'm afraid.

Hope the above helps a little.

- Ben


RE: 2 Questions - codezpecg - May 26th, 2009

Ben,

thanks for response, that makes sense for my 1st question, I will go ahead and develop it then post results and code here so you or anybody else can re-use.

For my second question, yes I created those via view but wanted to have views listed in LEFT SIDE Menu, so you can click the Link and takes you to specific VIEW.

Thanks


RE: 2 Questions - Ben - May 30th, 2009

Ah, I see.

Yes, I guess you can - but it's a bit of a hack. In the Edit Menu pages there's a "custom URL" option. Try entering a hardcoded absolute or relative link (from the webroot) to the forms page, passing in the view_id as a parameter. e.g.

Code:
/clients/forms/index.php?form_id=X&view_id=Y

The forms page accepts those values from the query string as well as post. (And don't worry, there's security in place that will prevent people from trying to hack it by passing in form IDs & view IDs that they don't have access to).

Let me know if this works.

- Ben