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
Duplicate field options - 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: Duplicate field options (/showthread.php?tid=677)



Duplicate field options - Rocket Music - Apr 29th, 2010

I'm confused.

In my form, many field VALUES are the SAME within a field (e.g. dropdown might have 3 selections with value 0). So, when I view the submissions, it appears that nothing is shown for those fields - I think that is the case when a selection is made that has a duplicate value in that field, e.g. when there are 2 options with the same value.

I understand that in most cases, you would not want to duplicate values, but I don't think this is uncommon, is it? In my case, value is the added cost for an feature selection, so it's often the same number for several field selection options.

My, questions:
Do the Field Values in each Field Options Group defined in FT forms need to match the form field values declared in the form itself? Would changing those to different values fix my issue or mess up submissions?

Is there a way to view and send the entire form (field names, selection, etc.) like you see when you view then edit the submission? I don't understand why the view doesn't contain the selections, just the value of the selection. The selections are there when I view then edit - how do I get transfer all of that data?

Or am I missing something here?

thanks for any help !!

Dan


RE: Duplicate field options - Ben - May 1st, 2010

Hey Dan,

Quote:I understand that in most cases, you would not want to duplicate values, but I don't think this is uncommon, is it?

Actually, yes! Unfortunately, this won't really work for any script. Here's the problem. Imagine your dropdown has these values:

Code:
<select name="example">
  <option value="0">Zero option 1</option>
  <option value="0">Zero option 2</option>
  <option value="0">Zero option 3</option>
</select>

Passing the values is fine - Form Tools will happily store "0" for the field, but when it comes to re-populating the field within the UI, it won't know which one was originally selected since they all had the same values. Multi-option fields - dropdowns, checkboxes & radios - all must have unique values for each option in their group.

Quote:Do the Field Values in each Field Options Group defined in FT forms need to match the form field values declared in the form itself? Would changing those to different values fix my issue or mess up submissions?

They *can* be different, but it's generally simplest if you keep them the same. Sometimes I change the labels for the options, to make them more descriptive within the Form Tools UI, but generally I keep them the same. The important thing is that the values are the same. That's what's uniquely identifies each option. So if they're different, any values in the form that aren't in the field option group won't be displayed.

Quote:Is there a way to view and send the entire form (field names, selection, etc.) like you see when you view then edit the submission? I don't understand why the view doesn't contain the selections, just the value of the selection. The selections are there when I view then edit - how do I get transfer all of that data?

I actually don't quite follow you here... would you mind explaining this one again?

Thanks!

- Ben


RE: Duplicate field options - Rocket Music - May 18th, 2010

Ah. cool. I see.
I solved my problem by calculating option prices without reference to the element value. There's several ways to do this, but I used a function with an array (javascript) that referenced the same option number. There's better ways, but this works fine.

And I can keep all of my value labels as descriptions of the field option.

thanks !!!
Dan


RE: Duplicate field options - Ben - May 20th, 2010

Nice! And np. Smile

- Ben