How to dynamically change default value of the drop down field of the gravity forms depending on the selection before landing on the form page - wordpress

I have a page with a pricing table:
plan A
plan B
plan C
I want to use only one gravity form with a drop down default value filled depending on what the user have selected.
For example, if the user selected 'plan B' from the pricing table, the form will show the drop down 'plan B' selected by default.
Can someone help me with this?

In Gravity Forms for your dropdown you will have a value. I found that as long as the value was one word it was easy to get it to be the default.
For you I would name each of your three things PlanA, PlanB, PlanC
Make sure show values is checked if you want it to be required.
Go over to the Advanced tab check the "Allow field to be populated dynamically" box and then for the parameter name enter a variable. I used default_value. Then on your different Plan names in your table you will need to add this. Plan A
where "planForm" is obviously the link of your page and the default_value is equal to the value of the dropdown item you wish to be default.

Related

display moderation field in view filter

I have webform module in drupal 7.23.I have 4 fields in name,email,message and publish fields.publish field is displayed only for admin user and not displayed for anonymous user.
publish field is a select option.This webform field is not available in filter criteria.
I want to save the content as draft and display only after admin review ie) have to add filter criteria for publish field in view.
Now I want to publish filter is not available for filter criteria.
I want to display the content if publish field value is 1
Let me share my findings, it works for me according to your requirement.
Webforms' Select List won't work with views expose filter as it works with content type/taxonomy. See comment by webform contributor here
To achieve that follow these steps:
1st step I created a new component in the webform named as published? with the type Select options and set its default value as "no" (because it won't show to other user it'll be empty so they can't set an value the you can't filter submissions) and check the Private check box like this
2nd step Create a views page for webform submissions like this
3rd step Add relations using Webform submissions: Data and set up like this
4th step Add filter criteria using Webform submission data: Data field field, expose it, choose Grouped filters radio option, select widget type as select and set relationship and don't save it yet
5th step For the group filter, there is table below (scrrenshort) you can add your values like you add value while creating the Publish component in webform.
I hope this'd work for you. Thank

Rearrange child subtab in Netsuite

I have a requirement to have two custom record types under parent subtab arrange in order. I used parent-child relationship but the arrangement of the child subtab is something I couldnt customize. 'test one' and 'test two' are my custom record types, and Parent is item fulfillment record.
I want 'test one' to come first and then 'test two'.
I tried adding a new Subtab via customization under translation and this order customization is not available in netsuite. Am i missing anything?
Please help.
Edit the record
Click "customize" then "customize form" in the top right of the form
Navigate to "Lists" then select "Communication"
You can drag and drop your prefered order from this screen
Name then save the custom entry form
You can then manually select this form for the record or set it as the default form
If a field is visible on the form, then it appears somewhere in the Custom Entry Form screen. Which tab it's on depends on the type of field. It could be under Lists, or Fields, or elsewhere. Look for it.
When you find it, use the Field Group dropdown to move the field between the main view and sub tabs, and drag/drop the field to change its top-down display order. The drag handle looks like ⋮⋮.

Drupal 7 DraggableViews order

I have 2 separate views for the image gallery having categorize using term.
One for admin(draggable) and second for anonymous user. Admin can change
order(weight) of the gallery.
I am using this weight in second views but this is not working properly
Even i have added SORT CRITERIA on **Draggableviews: Weight (asc)** in
both views.
Is there any way to add as a field weight so that i can debug this issue or any other solution
Only solution that worked for me was the following:
go to your content type/vocabulary
add a weight field (label: weight | machine name: weight | field type: integer
edit your sorting view and add sort criteria for your newly added weight field
edit your draggable views field and change "Handler" from Native to FieldAPI
under Field select your weight field
go to your content view and add the new weight field as you sort criteria
This is the only thing that worked for me. If it doesn't work immediately, just reorder a few items on your draggable view so that the ordering values are reset.
Hope this works for you too.
The draggableviews module doesn't use the weight field for sorting. If you have followed the instructions for using the draggableviews module you should have two views, 1 for sorting with the draggable items and 1 for displaying the sorted view. It is important that on both your views you should have the 'DraggableViews: Order' as the FIRST sort criteria.
As a final extra step, you'll go back to your regular page display for the view and add "DraggableViews: Order" at the Sort criteria section and place it as the first Sort criteria. For sorting order, choose "Ascending".
https://drupal.org/node/283498

Drupal views exposed input as form select (/jumpmenu)

I have content type called news. I have a view thats lists all the news. But now I would like to filter those by year and type. User could select from select menu / dropdown the publish year (2010, 2011, 2012 so on) and also the type of the news (taxonymy terms).
I was playing around with views exposed but I only got a text input field. Can I somehow get a select menu instead of normal input field? And also how can I list all the publish years when news are published to that select menu?
Should this be done even with views?
====
PAGE
Filter dropdowns: -type- -year-
Press releaseses listed down here according the filters.
Select boxes will only be used in Views exposed filters when there is a finite number of possible values. In other words, if your field you want to filter on has something set in the 'allowed values' section you should have the option of a select box if you choose "FIELD NAME - Allowed Values" as the field to filter on in Views.
If your field has an unlimited amount of possible values, you could always write a custom module to create a block with a form that presents your select boxes and directs the user to the view (using the filter parameters of the view).

Drupal: Views: how to group fields

I've created a views of node and I've selected the "fields" option in order to select which fields to display and in which order.
Is there a way to group such fields ? It would be very useful to have parent divs in my html code.
thanks
There's a simpler way to do it: http://www.arsnova.cc/web-development-articles/2012-07-27/grouping-fields-together-drupal-views
Let's say you want to group fields 1-3 together within a div.
First, exclude fields 1 and 2 from display. (By "exclude", I do not mean to delete them from the views display; rather, click on the "exclude from display" button within each field's options.) The fields you exclude from display must come before the other field for this to work. If they don't, rearrange them so they do.
Go to field 3, and rewrite the results, inserting the token for each of fields 1-3.
That's all you need to do. Fields 1, 2, and 3 will now appear within field 3's div. If you want, you can also add additional markup within the "rewrite results" area.
Recently found the best way for my needs and apparently for the needs of many people:
Use views_fieldsets module https://drupal.org/project/views_fieldsets, it allows yo to create a grouping div to put fields inside.
Grouping is built into Drupal 8 Views. So no need for any extra modules. Here's how:
Edit your view (be sure it has fields)
Click Format's Settings
A box will pop up with all your selected fields
Look right underneath all the field names, there should be "Grouping field Nr.1"
Select the field you'd like to group by
Click Apply
If you want to subgroup with a second field, just go back to 2 then you'll see "Grouping field Nr.2"
That's it.
Yes, click on the gear next to the Style option (under Basic Settings) and set the Grouping field. Keep in mind, the grouping field needs to be added to the view, but you can check the Exclude from display option to hide it, if needed.
I'm pretty sure that would give you a parent div. If not, you could add the parent div, by overriding the default templates (look to the Theme: Information section, under Basic Settings, for more information).

Resources