215 Posts
cubist
10 years ago
4
Topic

I have been testing what happens to GroupX data when a user submits a form that includes a GroupX.

In the main form, the user is allowed to add or remove GroupX fields.

In the test, the user does the following:

  • Adds a test (and fills it out)
  • Adds another (and fills it out)
  • Removes the first test
  • And continues as usual
  • Submits the form

In the admin back-end, I can see how the data has been re-arranged over the 2 GroupX fields. Even tho the first was removed, I still see 2 GroupX fields.

The first GroupX (that was removed) contains some data, AND

The second GroupX (that remained) contains the rest.

All the data is from the one I kept, ie did NOT remove.

I noticed this problem because my template inverted parts of the GroupX field when rendered, if I had removed one.

The ONLY way I can see thru this problem is to NOT allow users to remove a GroupX type field.

Hmmm....

Using Seblod 3.3.5

Get a VIP membership
693 Posts
rpoy
10 years ago
0
Level 1

Hi cubist,

Is this a cache issue or can you see the values in the database?  Do you get the same results with another browser?

thanks,

Randy

215 Posts
cubist
10 years ago
2
Level 1

Yes, tested in FF, Safari and Chrome -- all the same

Here is the way I entered the data

Dermatopathology Test 1
Site Paw1
Test Dermatopathology
Specimen Type & Qty 1 slide

Dermatopathology Test 2
Site Paw2
Test Dermatopathology, second opinion
Specimen Type & Qty 2 slides

Then I removed the first entry.

Here is how it appeared in the DB, as you can see the entries are now mixed across GroupX[0] and GroupX[1]

/>::cck_trf_dermato_test::dermatopathology_specimen::/cck_trf_dermato_test::
::dermato_syndrome|0|trf_dermato_test:: Paw2::/dermato_syndrome|0|trf_dermato_test::
::dermato_stat|0|trf_dermato_test::::/dermato_stat|0|trf_dermato_test::
::dermato_stat_note|0|trf_dermato_test::::/dermato_stat_note|0|trf_dermato_test::
::dermato_test|0|trf_dermato_test::::/dermato_test|0|trf_dermato_test::
::dermato_test_other|0|trf_dermato_test::::/dermato_test_other|0|trf_dermato_test::
::dermato_specimen|0|trf_dermato_test:: 2 slides::/dermato_specimen|0|trf_dermato_test::
::cckend_trf_dermato_test::::/cckend_trf_dermato_test::


::cck_trf_dermato_test::dermatopathology_specimen::/cck_trf_dermato_test::
::dermato_syndrome|1|trf_dermato_test::::/dermato_syndrome|1|trf_dermato_test::
::dermato_stat|1|trf_dermato_test::::/dermato_stat|1|trf_dermato_test::
::dermato_stat_note|1|trf_dermato_test::::/dermato_stat_note|1|trf_dermato_test::
::dermato_test|1|trf_dermato_test:: Dermatopathology, second opinion::/dermato_test|1|trf_dermato_test::
::dermato_test_other|1|trf_dermato_test::::/dermato_test_other|1|trf_dermato_test::
::dermato_specimen|1|trf_dermato_test::::/dermato_specimen|1|trf_dermato_test::
::cckend_trf_dermato_test::::/cckend_trf_dermato_test::

This also makes sense as to why the "2 slides" text appears before "Dermatopathology, second opinion" in my rendered template. 

Also, it very strange in the admin area because both entries are still shown and the data is across both there as well

693 Posts
rpoy
10 years ago
1
Level 2

Hi cubist,

I have tired to verify this scenario, but I am not able to duplicate the same issues.

Perhaps, you can try recreating the GroupX field?

regards,

Randy

215 Posts
cubist
10 years ago
0
Level 3

Yea, that would be hard at this point.

Not sure why recreating it would help, please clarify.

If you like I would happily set up a test environment where you can view my results. 

Get a VIP membership