Formit, passing values in a preHook - modx

Is it possible to pass values from a link to a form? I have a page with four different links and they all supposed to redirect to a form. Each on of them should have a different value and based on that show a different(in content) dropdown.? any ideas?

I haven't tested it but you should just be able to put a snippet call in the form where you want the value to be placed that is dynamic to the form. Then in the snippet just use the $_GET variable to grab the values from the url. From there you can do your logic and return the proper content for the form.

Related

How to enter parameters into power BI template pbit file and then letting those load before next dynamic parameter is selected

I have four parameters that are required in a pbit powerBI template for the report to load. However, the fourth parameter(org_ids) is a dynamic dropdown parameter that needs the first three parameters to refresh and get the list of values that will be used in the dropdown in the org_ids parameter. Is there a way for the user to enter the first three parameters and let those refresh and then a new popup is loaded that lets them use the dropdown arrow for the fourth parameter? otherwise, the user has to manually enter the fourth parameter instead of using the dropdown button.
Attached is a picture of the different parameters used.
four parameters in pbit template
The only way the dropdown in the orgs_ids parameter worked was if the first three parameters were sources and not parameters. However, this won't work because this report will be used by multiple users with different parameters.

Redirect URL on form

I am trying to redirect a Kentico form based on whether a checkbox is selected. I tried adding a macro in the URL direct property using the checkbox id generated by Kentico and the element name but it doesn't seem to work.
Anyone have any examples?
Thanks,
What macro are you trying to use? I just tested (with a textbox field not a checkbox field) and it worked:
/home?{%emailinput.value != "" ? "notEmpty" : "empty"%}
Assuming you have a bit field "mycheck" and your form called "mytestform"
If you put the following macro in Forms\mytestform\General\After the form is submitted-> Redirect to URL:
/{%CMSContext.Current.SiteObjects.Forms.mytestform.Items.LastItem.mycheck? "mytest2/" : "mytest1/" #%}
Based on mycheck value a user will either redirected to /mytest2/ or /mytest1/

Gravity forms - merging values

Need some help with Gravity forms. I need to have a field, that is a merge of values ,that user has previously selected.
So, if a user has selected 3 different fields wth values of 1)XYY, 2)YYX,3)YYZ I do not need a sum, just a plain merge, in form of XYY.YYX.YYZ, or anything like that.
Could that be acomplised with some merging tags, or dynamically population?
Thanks
Of course;
You should create two different forms.
Collect data with field1-field2-field3, they can be single line text, number, date or anything. In the advanced tab of field settings, write a parameter name for each one, like field1-field2-field3.
In the second form create a single line text, in the advanced tab of field settings check "dynamically populate field" and write your parameters like field1.field2.field3.
In form1 settings->confirmations->redirect URL line, write your form2 page url where you added form2. Select "Pass field data via query string" and add your parameters like field1={fieldname:1}&field2={fieldname:2}&field3={fieldname:3}
When you submit form1, your form2->single line text field will capture the parameters as you wish.
This is possible with Gravity Forms Populate Anything by...
Add whatever type of field you'd like to use to capture the combined.
Set the Default Value to the merge tags of your 3 fields: #{Field A:1}.#{Field B:2}.#{Field C:3}.
That's it.
Edit: Updated screenshot for Gravity Forms 2.5 and updated merge tags to use the # to make them "live".

viewPanel: how to set a colspan value for response type view entries

Using a viewPanel, how can we display a reponse entry the way it is displayed in the Notes client? Or in other words: is there a way to build some kind of colspan for specific columns based on the current entry's document type?
I made some code a while back to make the categorized views behave more like Notes:
http://dontpanic82.blogspot.no/2010/10/xpages-make-categorized-views-behave.html
Here's another solution from Stephan Wissel:
http://www.wissel.net/blog/d6plinks/SHWL-86V67E

default values to hidden fields

I created a content type that uses a CheckBox that has a default value. When I save documents of that content type the default value behaves as expected. If I make that checkBox hidden and create a new document with the content type it is not assigning the default value. When I look at the XML results from a search that returns all documents in that content type the document created with the hidden field on it doesn't even have a node for the hidden field.
Is there something special that I need to do to get the hidden field to take it's default value?
It's not exactly the answer of your question. But you can make it a normal (not hidden) column, and hide it from the forms with a simple JavaScript code. You can add a content editor Web part to embed the necessary JS code to the form.

Resources