I have a campaign in Sendgrid, using the Marketing (Legacy) version. I'm trying to use Handlebars to evaluate a custom field (GC_Bounceback_Code1). If it contains a static dummy value (i.e. zzz-aaa), I want it to display nothing. If it contains anything else, I want it to display the contents. The #equals helper I've used is below. I've used it in a Campaign Code Module and in a Template Code Module. It just displays the code as HTML text.
{{#equals GC_Bounceback_Code1 "zzz-aaa"}}
""
{{else}}
[%GC_Bounceback_Code1%]
{{/equals}}
Thanks for any help you can provide.
i asked support about this very question. they responded with this:
Unfortunately, conditional statements are not supported by legacy Marketing Campaigns templates. Rather than utilize conditionals, you could achieve your use-case by creating two separate templates and using a Custom Field within your contacts to create segments based on that custom field. You could then create a segment to utilize with template 1 and a separate segment to utilize with template 2 based on the criteria within the custom field and send each respective segment the proper content within the template.
Related
I want to generate a PDF letter using some fields e.g. name, nationality etc. that the user will submit using a form on a WordPress website. The letter has a certain template and only these fields change depending on the input.
Without much detail in the question or knowledge of access to code (API) in Wordpress, you could use an API like TCPDF
Via JetPack perhaps?
I want to have a template when people from support group want to add bugs.
Here is an example (https://github.com/photonstorm/phaser/issues/new) in GitHub that I want to implement in Phabricator if possible.
Phabricator supports customizing forms, including the 'create task' form. There are a couple of ways to go about it and they are covered in the documentation.
The simplest way to customize forms is to provide default values in the URL for the links you provide, for example, say you link to the bug submission form from your documentation. You can supply the template text as part of the link itself. This can result in long ugly URLs but that can be masked by using a url shortening service.
I'll use Wikimedia's phabricator as an example of how this works. If you want to make a link to the create task form with your template text pre-filled, you construct a url like the following:
https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?description=[insert template text here]
The other way to do this, which doesn't require you to store the template text in the url, is to edit the form and specify a default value for the description field. Editing forms is covered in the phabricator upstream documentation so I won't go into that, instead I refer you to the documentation section under the heading creating new forms.
i am using rich review plugin to create a rating system.what i want is to rate the different categories of a single product like looks,hair and teeth of a person for example,what i did was created a form in rich review and i want to use this code snippet [RICH_REVIEWS_FORM category="person"] with in a single page,it enables me to use this code snippet and even displays a three different forms,the problem is i can supply input through only one form,even if i change the category of the forms to different name,i can only supply input to only one of the form?
This requires a patch from the plugin author, both for the JS that handles the form elements, and the $_POST submission of the form data.
Essentially the patch allows you to have independent forms on the same page by using a shortcode parameter for a unique key. So for instance two forms on the same page might look like this.
[RICH_REVIEWS_FORM category="something" unique_key="one"]
[RICH_REVIEWS_FORM category="something_else" unique_key="two"]
See this thread
My client has a bizarre request which is making it difficult to build a slideshow on profile2 pages: The profile2 pages require 4 photos to be uploaded, and he does not believe that the users adding content to the site will "get" the multi-select method found in most file upload modules. The Field Slideshow module only works if you're using multiupload (which of course makes sense), and that's how I had it set up initially - which worked perfectly. I've tried using the field collection module, then creating a Slideshow view, but the image fields in the field collection field aren't being seen as a group. I think I had to select one of the 4 image fields to use instead of all 4. Any ideas?
he does not believe that the users adding content to the site will "get" the multi-select method found in most file upload modules
This hardly makes sense, I guess you tried to explain things to your client ?
Assuming you have several image fields on your content type, you could build a view which create a list (unformatted or HTML list) of these fields, maybe using a global field rewriting (you add all your image fields, exclude them from display, custom their display by removing field wrapper and field+label wrapper (in order to get only ), add a global text field in which you include image fields token), and then create your slideshow in a custom javascript file, using whatever library you like (Cycle2 is great).
Your global text field would look like :
<div class="wrapper cycle-slideshow">
[field_image]
[field_image_1]
...
</div>
(with cycle2 adding a cycle-slideshow class will initialize your slideshow)
...but you need token to do so.
I often find it more convenient to setup javascript things like that (slideshows, gmaps...) by myself instead of using views integration.
Hope I understood your issue correctly, good luke with this.
For every (custom) field you have option "Number of values" which you can set to fixed amount (i.e. 4) or unlimited. Can you use that?
Easier: Use Rules. Create an additonal (fifth) image field (multivalued) that will be the one consuming the slideshow. Create a new Rule, triggered on creation or update of your content with 4 actions: each one adding the content of one of the fields to the multivalued field list. You probably need to avoid showing that field but that depends on what are you using to display, so hide it using display suite or just not using it in the content template. This way, you show your users your 4 fields but makes the slideshow work based on a computing of the user inputs.
I need help on how to create a 'custom form' using the same fields provided by cck.
Drupal gives you the ability to add fields to 'nodes' and how to theme their output. But I would like to be able to post a data from my own form (that pops-up) and sends data to the drupal database using the same drupal cck.
How do I access the specific form inputs to add data to my content types ? because the default form is kind of 'ugly' and loads on different page(without ajax).
Help would be much appreciated
There are several routes you could go down.
The easier option is to use the Webforms module. While this gives you similar fields to cck, they are not exactly the same, and if you have a module that implements a specific cck field type, it won't be available to webforms.
The second choice is to write your own module using the forms api. This can mean a lot of learning, add it takes time to get up to speed, but ultimately you have total control over how your form will look and behave. The forms api doesn't give you exactly the same fields, but all the tools are there to create them. Sometimes you need to hack open a module to find out haw a specific field is implemented.
A third option would be to use cck itself. You could create a content type and add the field types you want on your form. You would them give users permission to create but not view or edit the content type. The form submissions would them be nodes on your website. This would make me slightly nervous, so make sure all your permissions are correct!
The second part of your question: you can use a theme file to override the appearance of most forms and make them pretty.
James