Drupal Webform Conditional Page Breaks - drupal-7

We have a semi-complex webform built using Drupal 7 / Webform 7.x-4.15.
We want to move the "Page Breaks" depending on the URL of the current page (we are showing the webform in a block). We are "moving" page breaks by hiding/showing different page breaks using conditionals and hidden "URL" field that is populated with current page URL.
The current page hidden “URL” field is at the top of the form above the first page break.
We can get the first example to work perfect. When we try and get other options to work, we can no longer see fields that are between the page breaks.
Example 1: example.com/page1 (Hide / Show Page Breaks)
Field 1
Field 2
Page Break1 (Show)
Field 3
Field 4
Page Break2 (Show)
Field 5
Page Break3 (Hide)
Field 6
FINISH
Example 2: example.com/page2 (Hide / Show Page Breaks)
Field 1
Field 2
Page Break1 (Hide)
Field 3
Field 4
Page Break2 (Show)
Field 5
Page Break3 (Hide)
Field 6
FINISH
Example 3: example.com/page3 (Hide All Page Breaks)
Field 1
Field 2
Page Break 1 (Hide)
Field 3
Field 4
Page Break2 (Hide)
Field 5
Page Break 3 (Hide)
Field 6
FINISH
How can we get this to work so we can effectively move page breaks between fields depending on URL of current page?
Cheers,
Dane

Related

How do we add a text in React table pagination component?

basically i need to add another text at the end . ie. , Page 1 of 2 recordds
I tried this property nextText={"nextpage"}, but does not work,Thoughts ?
You can use ofText prop
ofText= 'of records'
Which will give you ouput like,
Page 1 of records 2

Dependent submit button in angular to fetch JSON file and display

I'm working on an AngularJS project, also pretty new to this and have managed to create a dependent drop-down menu.
Example:
Parent Drop-down- Cars
- Bikes
Child Drop-down- BMW, Audi
- Yamaha, Honda
So from the above example, if I choose Cars in the first drop-down it will display BMW and Audi in the second drop-down. Same for bikes.
Now if the user chooses BMW and clicks the submit button I want it to redirect to a URL which contains a JSON file and display the result in the form of a table.
If the user chooses Yamaha similarly it should redirect to another JSON URL and display the result in a table.
How can this be achieved in AngularJS, with a single "Submit" button?
Any help is much appreciated.
Regards.
Your vehicle dropdown should have unique ID such as cars for 1, bikes for 2 here 1 and 2 are unique ID for this category of vehicles.
Now on submit call a function which will take you to another page now, send this uniqueID of vehicles into statparams and on that page and on page OnInit make a http call and bind the models to that dropdown.

Drupal Webform - How to load values from form, filled in a previous page

Working on Drupal, I have a page with a form made with "Webform" module, containing several fields (text fields and sliders) and a "Submit" button.
When the user enters the information and presses the "Submit" button, another page is loaded with custom code into it.
The new page is devided into 2 parts - the first one contains new information(based on the user input from the previous page); the second one contains (block) the same form, used in the previous page.
Is there a way to load the values, filled in the form from the first page into the new page?
First of all you would need to make a custom module, with the help of
hook_form_alter
You would need to store the previous form's information in cookies with prefix
Drupal_visitor_
and then display it in the new page like:
$form['submitted']['FirstName']['#default_value'] =
$_COOKIE[$firstname];
Thanks

How to display the taxonomy menu block when content display?

I created a vocabulary
Vocabulary 1
- Term 1.1
-- Term 1.1.1 (url : autogenerate)
-- Term 1.1.2 (url : autogenerate)
And I created a taxonomy menu block, a content type and a view by taxonomy->term. everything is so far so good.
But when I click content, I don't know how to display the taxonomy menu block when the content is displaying.
I tried to select content type at taxonomy's menu block. But not working.

Drupal 7 views Contextual filters with Page & Blocks

I have an issue and i'm hoping to get some advise.
I have a view created that show content based on the url:
eg:
domain.com/item/one
Shows fields for my node with the title one
domain.com/item/two
Shows fields for my node with the title two
etc etc.
The path for the PAGE in views is set to /item
What I'm having trouble with is I need to have a BLOCK (becuase I'm making it collapsable) show under that page with the specific URL show the body field for that node.
eg:
domain.com/item/three
Shows fields for my node with the title three as well as a block that show the body field for node three
I have set the Contextual filter for the PAGE to:
Content: Title
When the filter value is NOT in the URL
Show "Page not found"
Exception value : Empty (All removed)
Under More:
Case : Lowercase
Case in path : Lowercase
Transform spaces to dashes in URL : Checked
This works for the page but please let me know if I have set this up incorrectly.
I have set the same Contextual filter for BLOCK and it works in views preview but not on the page with the URL:
domain.com/item/three
Any advise on this would be greatly appreciated.

Resources