If you have the tablefield set to more than 1 "Number of values" or unlimited, the Locked defaults disappear on additional tablefields after the first one.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jenlampton’s picture

Version: 7.x-2.0-beta4 » 7.x-2.x-dev
Issue summary: View changes

Confirmed. Only the first table (delta = 0) is locked.

jenlampton’s picture

Title: Lock tables doesn't work on Add Another Item » Default values only fill the first of multiple tablefields

I've tracked down the problem with lock_values and it's that there has to be a value there to lock down in the first place. Unfortunately, the default values are not populating the second (and so on) tablefields on an entity.

jenlampton’s picture

Status: Active » Needs review
FileSize
940 bytes

here we go. The problem was the check for a default used delta when there was only a single default present, so it should have been using zero.

  • jenlampton committed 4c3c87e on 7.x-2.x
    Issue #1235896: Fixed default values only fill the first of multiple...

  • jenlampton committed 888d920 on 7.x-2.x
    Follow up to Issue #1235896: Make code easier to read & follow.
    
jenlampton’s picture

Status: Needs review » Fixed

This fix will be in the next release of tablefield.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.