Problem/Motivation

I am using following module a lot views_entity_form_field

Using this module you can create a drupal VIEW but instead of the standard fields you can use "form" fields which means you are able to update fields directly in view using "Save" button as follow:

views form field

However that save button is a different one: instead of standard id "edit-submit" it uses id element : "edit-actions-submit"

And instead of entity type like : node, taxonomy etc , this one uses views.

The main problem is that it seems validation does not work for such views forms. I have used following guide :
ECA content_validation
which works fine for me for standards edit pages, however I am unable to make it for for such "view" pages.

I am not sure what needs to be added to validate form as restriction. I have tried id of the form, id of view, or keep all restrictions disabled, however still once I setup ECA validation and try to save that views form it does not verify it and save normally. When I use the same with the standard content type edit - it does work.

Can anyone try ECA with this awesome "views_entity_form_field" field and determine what is preventing to validate such view page form ?

CommentFileSizeAuthor
FORM090613.png14.7 KBcoaston

Comments

coaston created an issue. See original summary.

coaston’s picture

Note: Once I enabled debug, I can see error : Access denied to Build node from submitted values (Activity_0lyc17w) from ECA Validation so basically it fails at the begging, but why such access is denied?

coaston’s picture

Well,

I have progressed. It seems that form does not to be build as it was already built by a module.

If there is view page like mine "/form-field-verification-test/%" to get ID from the url with ECA, we can use token : [current-page:url:args:value:1] where value:1 is our %, in our case nodeID=3651 from the whole link "/form-field-verification-test/3651"

2.Token : Set value with Value of token : [current-page:url:args:value:1] and the Name of token like "mytoken"
3.Entity: LOAD > Name of token "loadID", Load entity form : Type and ID (see below), Entity type : Content, EntityID :[mytoken]
4.Entity:Field Value is EMPTY > Field name : field_name (my case), Entity : loadID
5.Form Field : SET validator error >Field Name: form_field_field_name (as it is form field from module) , Message : Cannot be empty.

Only local images are allowed.

However Step 1 is problem now! Restrict of Validation FORM is needed!:

Form attribute for above case is : views-form-vform-field-verification-test-page-1-3651 so I can use it as Validate FORM - first step > Restricted by form ID.

However this will create constant and I am unable to change it.

My question is > Is there possibility to add token to "Restrict by form ID" of Validate form ?

In this case I would use following views-form-vform-field-verification-test-page-1-[current-page:url:args:value:1] But this does not work :(

Or at least to allow * in so I can use "views-form-vform-field-verification-test-page-1-*" ?

Any clue?

jurgenhaas’s picture

Access denied to Build node from submitted values (Activity_0lyc17w) from ECA Validation

This error indicates that you're using the "Build entity from form" action plugin which most certainly can't be used with that other module, because that doesn't provide an entity form, it provides a form with data from many entities. Therefore, this action can not be executed,

My question is > Is there possibility to add token to "Restrict by form ID" of Validate form ?

In event configuration, you can't use tokens, because no tokens exist yet at that point.

Or at least to allow * in so I can use "views-form-vform-field-verification-test-page-1-*" ?

That's not possible, but you can leave that field blank so that the event applies to all forms, and then you can add a condition afterwards to verify the form id against any sort of patterns you can think of.

coaston’s picture

Thank You,

I am using this views_entity_form_field because of BULK updates of content types.

So I am experiencing now different type of issue. I wanted to use QUERY:Views to get nid of all nodes so system (ECA) can validate them one by one.
- It works and do validation, however I am unable to click save button even I have changed/add required values because every time when there is a new loop - it will take another one will determine still the old value (empty field) and system things it is still empty even I am trying to change/add value so cannot get rid of verification error message once everything should be OK.

Looks like that :form build is missing here and I won't be able to continue.

jurgenhaas’s picture

Unfortunately, I don't know that other module and have no idea how that works and what context it creates, which may be important to how the ECA model would have to be built. You may have to debug that on your own to see what's causing the problem.

coaston’s picture

Well now I know the reason.

I am trying to change/add value so cannot get rid of verification error message once everything should be OK.

It is not Ok ,because the Form could not be build correctly because of 15818966 issue, so now I can try to work on that issue again.

jurgenhaas’s picture

Status: Active » Postponed (maintainer needs more info)

What's the status on this one?

jurgenhaas’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)