I created a survey using surveyjs's online designer and incorporated it into my web app. I would like to add two endings to the survey though.
If user clicks "no" for questions 2,3 or 4, it shows' the message "sorry ... thank you" instead of the default "thank you for ..." that I have as the current ending under the "completedHtml" section.
I essentially want to add two possible endings for the user tied to the logic rules I've set.
I've tried to just create a new "completedHtml[2]" section think (I'm sure the proper term) but I can't figure out how to redirect the logic from just end survey to end with completedHtml2 page.
You can use survey.completedHtmlOnCondition property.
You can see how it is implemented in our NPS example.
Thank you,
SurveyJS Team
Related
I am trying to build a webapp. It is basically a textbox for now. If the user writes something it should be stored in the database. The database is a mariadb instance. The user should be able to write anything, emojis, japaneese, chineese, germanic letters etc. The user will also have a button that makes it possible to insert components in the text. To know where in this text the components should go I am thinking about doing it like this:
"This is some text the user writes [button] words".
Now the server could know that if it finds [button] in the text, a button is supposed to be there. Now the problem is if the user writes for example "This is some text the user writes [button] [button] words".
The first [button] is written as text and should be displayed as regular text. The second [button] is a command for the frontend to insert a button there. But there is no way to differentiate these two buttons keywords. How could this issue be solved? What is best practises here?
I tried to ask chatgpt and google around but honestly, I think I am using the wrong words when searching. I do not really know what to search for, only how to explain my issue.
Thank you for your help!
I want that my NAO-robot (Version 6) uses another name than NAO, when someone asks "What is your name?". I already changed it's name in the settings, but it doesnt use it by the voice recognition.
The basic channel's content is probably generic and might not adapt to your robot's actual name. But by making a small app reacting on the same trigger sentence, you might be able to override the current behavior.
I am trying to create a spreadsheet for a World of Warcraft community, based on certain posts/events happening where we #tag the involved people. We would then normally go to our excel sheet and enter manually the names of the participants and all the rest of the details.
I have been trying to do it with Zapier, and i managed to fix all my rules/steps, but the moment i #tag anyone, the text sent/parsed is " !185020918530048000> " instead of "Loco-Silvermoon" for example.
Please help, any insight would be most welcome.
Anyone got an idea about that? or any Bot/Platform that would work around that? My thought process took me two solutions. Either get a bot to replicate all the chat happening on that channel to another private channel that only i can see and where tagging is not allowed (no idea if that exists or work). OR, get a Bot with a plaintext option that would just send me the text instead of the tagtext.
How to add a restriction or validation for a content type that can be add only one content.
ex - Hotel web site room listing page should have only one content. After added once that only can edit or delete.
(I am a beginner for the Drupal)
Have you checked Node Limit module? I have never used it, but seems suitable for what you want to get.
Hope it helps.
First time poster here, I'm a designer not skilled at all with php and I have a small issue I don't seem to be able to solve. I'm making a site in drupal 7 using a sub theme on zen.
Btw this is a great CMS, even though people say it's really more a developers CMS. I have no trouble to do what I need using views, rules, display suite etc. So a big thank you for all the developers out there making this such a good CMS. But for this apparently simple problem... no module will help me (I think) and I'm kinda stuck.
So here it is: I'd like to add a subtitle next to the title in all my pages.
So what I did was to add a custom field into the content type basic page (machine name: field_sub_title) which is a simple text field.
I uncommented the following line in my template.php
function mytheme_preprocess_page(&$variables, $hook) {
$variables['sub_title'] = t('field_sub_title');
}
Now my question is how do I load the content of my custom field into that variable?
I know i need to change the second part, but I don't have a clue as into what I need to change this.
Displaying the variable into the the page.tpl.php is something I know about so I only need help with the first part.
{EDIT}
Ok I found how to do this :)
I was looking for a solution in the wrong place. I don't need to change any thing in the template.php file.
Just needed to add this bit of code into my page.tpl.php:
<?php
print $node->field_sub_title['und'][0]['value'];
?>
So I'm posting this here for other Drupal newbies struggling with this....
Your solution may work for now, but there may be a more Drupal-y way to handle a problem like this. If you haven't noticed any problems yet, you may find one or more of the following issues down the road:
Someone who doesn't know php or Drupal theming may need to change the way this works.
If you're like me, you may forget where exactly in code this was implemented.
You may see superfluous markup and/or errors on nodes (content) that do not have this sub-title field (ie. event content not having a sub-title field while basic pages and news articles do).
When you add a field to a content type, it will automatically appear anytime content in that content type is displayed. You should be able to add the sub-title field for your page, event or whatever else you need and have it automatically appear in the markup.
You can 'manage display' of a content type to drag and drop the order for fields to appear. You could take it a step further by using a module like Display Suite to add formatting or layout per-content type.
If you feel like this isn't good enough and the markup for the subtitle must be at the same level as the page title (which is rare), at least add an if statement to make your code check to see if the variable is present before trying to print it. I'd also add a new variable and comments for code readability.
<?php
$subtitle = $node->field_sub_title['und'][0]['value'];
if($subtitle){
print $subtitle;
}
?>
Consider using field_get_items or field_view_value, or at least use the LANGUAGE_NONE constant instead of 'und'
See https://api.drupal.org/api/drupal/modules%21field%21field.module/function/field_get_items/7 and https://api.drupal.org/api/drupal/modules!field!field.module/function/field_view_value/7
This has the added benefit of reducing the number of potential security holes you create.