How to load contact field token in email template based on condition - mautic

I want to show the contact first name in the e-mail, but if the first name field is empty I want to show some other field. Is this possible?
Something like this:
Hi {contactfield=firstname} or if empty {contactfield=email}
Thank you in advance.

Yes it is possible, you can use "Dynamic Content" option available in slot type. it allows you to use variations in the content based on value of the the field.
simply add the slot, then put in a default value, click Add Variant and at the bottom right you can choose the field and comparison option.

Related

How to define dynamically the label of a 'text field' control in Orbeon Forms?

I wish to ask you if it is possible to define dynamically the label of a 'text field' control when a form is loaded. Actually, I need to pass the label value through a URL parameter and use this value to define the label. Is that possible? I've made a research for a similar case but I cannot find a way to get the value of a url parameter and set it as a control's label before the form is displayed in the user.
Regards,
George
In the Control Settings for your control, in the Label tab, do something as follows. Here I'm getting the value of the foo request parameter, but you'll most likely want to use a more meaningful name.
That's it, really: with this, when you load your form, say with the URL http://localhost:8080/orbeon/fr/a/a/new?foo=bar, the control will get "bar" as its label. Also see Template syntax.

Zapier dynamic dropdown on condition

I'm updating a Zapier APP through the Web builder. I need to add two fields:
The label of the first is "Vat Description", and is a text input field;
The second is "Vat Nature", a dropdown list.
I want to make this field required only if the value of the first is 0, or 0%
Any suggestions? thanks
David here, from the Zapier Platform team.
This is pretty straightforward to do. You want to put the second field in a function, which will generate it dynamically based on the contents of the first field. You can adjust whether or not it's required.
There's docs about this here.

ios/xcode/coredata: How to mimic ajax call in objective c

For a tag system, when entering a new item, I'd like the user to start typing a letter or two and see possible tags...similar to how SO tags work on the website i.e. Ajax.
Is there a way to do this on IOS?
Basically the Add Item screen has some empty text fields where you put the name etc.
I'd like to have an additional empty field where as you enter letters you see possible tags appear below and can then select one to tag the item.
The tags would be served from an entity or table so there would have to be a call to core data to supply them based on the letters typed.
Do I have to implement a full blown tableview to do this? Or is there a way to make the possible tags show up below the textfield box.
Thanks for any suggestions.
You could try a third party development in order to make what you want. In a recent project I have used this one:
https://github.com/EddyBorja/MLPAutoCompleteTextField

Select or input

In my app I have a form for creating new trip. Model Trip has field finish_address. For setup the finish_address in I use select in simple form to select address from user's addressbook. But I want to make a better form: if there isn't necessary address, user can add it using input field.
So I need to make form with to types of setup finish_address. How can I make it?
You have 2 basic options.
You can use autocomplete on a text input, populating a dynamic crop-down with know values.
There are several gems available to get you started in this direction, like https://github.com/crowdint/rails3-jquery-autocomplete.
Alternatively, you can add an "other" option to a select input, populated with your known values. When the "other" item is selected, display a previously hidden text input with the same name below the select input. The "lowest" element will take precedence, for what gets sent to the controller.
In the controller, just do a find_or_create_by, using your provided value.
These options both require javascript, but you can eliminate the need for javascript if you make your select a non-db-backed attribute, and manipulate your params accordingly, as they come in to the model. This might help with validations, as well.

how to set a fields from a url sharepoint 2010

I have a list called Case,in the Case form i have the folowing hyper link
http://appserver/Lists/Hearings/Item/newifs.aspx?List=928323ea%2Deace%2D4220%2D845c%2D84871b4f00a8&=&Case_x0020_Number=100000
if you can see at the end of the url I have the item Case Number,what I want is to make the Hearing add new form to have the value of 10000 at the Case Number
so the user don't need to re-enter the value.
but when I click that link it open the new form thing but the field corresponding to that value is blank.
Note : from the share point it self the Case Number of the Hearing is lookup from the Case Number.
is there away to accomplish this?
You say
but when I click that link it open the new form thing but the field corresponding to that value is blank.
This happens when you click the hyperlink directly from the list view?
If you want your "Case number" field to populate dynamically you should create a calculated column, and use a formula to take the current "Case number" for the selected item. After that you can create a Hyperlink in InfoPath and navigate from the item's edit screen...
The formula for the calculated column should be something like this:
=("LocationToNavigate?queryStringParameter="&ListFiedName)

Resources