I'm writing custom field type and widget based on it. It allows to create custom entities from node page and add node references on existing nodes. enter image description here

There are no problems with custom entities they added via ajax and pass again to widget by $form_state. For referencing existing nodes I'm using entityreference view and ctools popup. The problem is deliver back values selected in a view.

Common way to solve this - is custom submit callback for a view and ajax_command_replace() widget html.

But it's not useful in my case, because I'm rebuilding form all the time and only valid data is in $form_state.

Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.