0

I have a VBO form that is embedded in an EVA field on a user page.

The VBO uses a Rules component with a text parameter to allow the current user to enter a value to be used as a variable to perform the rule component action.

The action of the VBO form (for user 55) is /user/55/55 , this means that when you run the VBO action, the page that allows you to add the variable is still the user page, and this causes a horrible busy page, when all I want is a plain page with the text field.

In light of this, I have tried setting my own new action using

hook_form_alter

and

$form['action'] = '/my/url';

but this results in a page not found on /my/url

Is there another way that I can control the parameter entry page URL for VBO?

More information:

The view doesnt have a path as it is an EVA (Entity Views Attachment) which is a view embedded inside the manage display settings of the User page. The issue im having is that after you select some rows and execute the VBO action, there is a text area variable (in this case, a message area to be included in the email sent by VBO) which appears in the same area as the rows you just selected.

This causes a bit of chaos as the URL for the form #action (FAPI) is user/55/55. What i want to know is if I can use hook_form_alter to change form #action to a new page, something like /send-rsvp where the user can fill in the text area and click send.

6
  • Not sure if I correctly understand your question, but what is the path (within page settings) of your VBO view? Is it something like "user/%/something" (which I suspect). Assuming that there is another way to make the uid available to your VBO / Rules Component combination (IMO there is one), would it be an option for you to use some other path that does not start with "user/%" so that your "...is still the user page..." is no longer applicable? PS: just to be 100% sure of your terminology: what do you mean by "VBO form action"? Aug 24, 2016 at 17:42
  • Hi Pierre, I will update the question with some more info.
    – Collins
    Aug 25, 2016 at 13:06
  • ok; a little progress to better understand your question. Some more questions: (1) that "user/55/55" (for user "55") is confusing. How would that look like for user 123? (2) About the "eMail sent by VBO": is that via one of the standard VBO operations you can select, or is it rather your Rules Component which has a Rules Action like "send an eMail" (might help to better understand if you add an export of your Rules Component)? Aug 25, 2016 at 13:22
  • For user 123, it would be /user/123/123 , this appears to be the default behaviour of VBO as it uses $_GET["q"] to find the current url to build the #action. The "email sent by VBO" is the consequence of a Rules Component which evaluates a few variables and sends the email.
    – Collins
    Aug 25, 2016 at 15:39
  • I'm unsure as to why you're using EVA for this instead of a regular page.. And what do you mean by the page is busy? And what chaos does the url cause? Aug 26, 2016 at 11:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.