For example if the user selects an option, closes the selection window, then reopens it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jsacksick’s picture

Status: Active » Postponed (maintainer needs more info)

Can you explain more what you want? It's not super clear.

gaele’s picture

Title: Make selected checkbox autopopulate to show items are selected » Selected items are not checked on reopening modal
Version: 7.x-2.0-alpha1 » 7.x-2.x-dev
Component: User interface » Code
Category: Feature request » Bug report
Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active
  1. Click "Add items"
  2. Select one item and click "Add items and close window"
  3. Click "Add items" again

The earlier selected item is unchecked.

Tested with a view showing "fields".

jsacksick’s picture

Status: Active » Closed (duplicate)
gaele’s picture

Status: Closed (duplicate) » Postponed

Once the argument is passed into the view (#2203703: Passing ids from entityreference into view not working) the checkbox should be displayed as checked for the selected item(s). Currently it is always unchecked on opening the modal.

__cj’s picture

The attached patch, checks the checkboxes in the modal window.

BUT it doesn't yet handle unchecking the checkbox - the checked checkboxes are disabled with this patch. Hence the 'needs work'.

NOTE: This patch is wholly dependant on the patch supplied in #2203703-15: Passing ids from entityreference into view not working!

jsacksick’s picture

Status: Needs work » Closed (works as designed)

A fix has been committed for [#8566935], if you use the "Pass selected entity ids to View" setting and follow the instructions described on the project page, the checked entities won't be displayed in the modal.