{"id":54,"date":"2021-08-24T19:06:06","date_gmt":"2021-08-24T17:06:06","guid":{"rendered":"https:\/\/www.themes.tatwerat.com\/ah-survey\/?page_id=54"},"modified":"2021-08-24T19:06:06","modified_gmt":"2021-08-24T17:06:06","slug":"conditions-demo","status":"publish","type":"page","link":"https:\/\/themes.tatwerat.com\/ah-survey\/?page_id=54","title":{"rendered":"Conditions Demo"},"content":{"rendered":"<div class=\"ah-survey-front\" ng-controller=\"AHSurveyCtrl\"\n     ng-init=\"expire_dateCountdown(''); dateCountdown('2021-08-23'); Survey.data={&quot;id&quot;:6,&quot;title&quot;:&quot;Survey With Conditions On The Questions &quot;,&quot;description&quot;:&quot;&lt;strong&gt;Lorem Ipsum&lt;\\\/strong&gt;\\u00a0is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\\\&#039;s standard dummy text ever since the 1500s&quot;,&quot;welcome_message&quot;:&quot;&quot;,&quot;end_message&quot;:&quot;Thank you for your response \\ud83d\\ude0a&quot;,&quot;is_active&quot;:true,&quot;start_date&quot;:&quot;2021-08-23&quot;,&quot;expire_date&quot;:&quot;&quot;,&quot;start_date_active&quot;:false,&quot;expire_date_active&quot;:false,&quot;allow_prev&quot;:false,&quot;allow_multiple_responses&quot;:true,&quot;allow_add_response&quot;:true,&quot;allow_progress_bar&quot;:false,&quot;response_type&quot;:&quot;anonymized&quot;,&quot;survey_view&quot;:&quot;all-in-one&quot;,&quot;meta&quot;:{&quot;show_answers&quot;:&quot;true&quot;,&quot;send_responses_email&quot;:&quot;true&quot;,&quot;next_on_answer&quot;:&quot;false&quot;,&quot;allow_redirect&quot;:&quot;&quot;,&quot;emails_list&quot;:&quot;tatwerat@gmail.com,Abdo.Contract@PTCO.COM.SA&quot;},&quot;questions&quot;:[{&quot;uid&quot;:1629816797297,&quot;name&quot;:&quot;What is your name?&quot;,&quot;help&quot;:&quot;Enter Your Name&quot;,&quot;type&quot;:&quot;short-text&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;placeholder&quot;:&quot;&quot;,&quot;input_mask&quot;:&quot;text&quot;}},{&quot;uid&quot;:1629816827737,&quot;name&quot;:&quot;Your Gender&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;buttons&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;answers&quot;:[{&quot;label&quot;:&quot;Male&quot;},{&quot;label&quot;:&quot;Female&quot;}],&quot;other&quot;:false,&quot;is_other&quot;:false},&quot;condition&quot;:{&quot;question&quot;:&quot;1629816797297&quot;,&quot;operator&quot;:&quot;is_not_null&quot;,&quot;value&quot;:&quot;&quot;}},{&quot;uid&quot;:1629816867850,&quot;name&quot;:&quot;Your Age&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;buttons&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;answers&quot;:[{&quot;label&quot;:&quot;+12&quot;},{&quot;label&quot;:&quot;+16&quot;},{&quot;label&quot;:&quot;+18&quot;},{&quot;label&quot;:&quot;+21&quot;}],&quot;other&quot;:true,&quot;is_other&quot;:false},&quot;condition&quot;:{&quot;question&quot;:&quot;1629816797297&quot;,&quot;operator&quot;:&quot;is_not_null&quot;,&quot;value&quot;:&quot;&quot;}},{&quot;uid&quot;:1629816958744,&quot;name&quot;:&quot;Country&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;checkbox-list&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;answers&quot;:[{&quot;label&quot;:&quot;United Arab Emirates&quot;},{&quot;label&quot;:&quot;Saudi Arabia&quot;},{&quot;label&quot;:&quot;Egypt&quot;},{&quot;label&quot;:&quot;Qatar&quot;}]},&quot;condition&quot;:{&quot;question&quot;:&quot;1629816797297&quot;,&quot;operator&quot;:&quot;is_not_null&quot;,&quot;value&quot;:&quot;&quot;}},{&quot;uid&quot;:1629817035140,&quot;name&quot;:&quot;Country Internet Speed&quot;,&quot;help&quot;:&quot;The Speed for MB&quot;,&quot;type&quot;:&quot;slider&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;min_value&quot;:25,&quot;max_value&quot;:1000,&quot;step_value&quot;:1},&quot;condition&quot;:{&quot;question&quot;:&quot;1629816958744&quot;,&quot;operator&quot;:&quot;in&quot;,&quot;value&quot;:[&quot;United Arab Emirates&quot;,&quot;Saudi Arabia&quot;]}},{&quot;uid&quot;:1629817096385,&quot;name&quot;:&quot;Your satisfied with internet speed&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;emoji&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;emoji_count&quot;:&quot;5&quot;},&quot;condition&quot;:{&quot;question&quot;:&quot;1629817035140&quot;,&quot;operator&quot;:&quot;greater_than&quot;,&quot;value&quot;:500}},{&quot;uid&quot;:1629817155391,&quot;name&quot;:&quot;The reasons for happy&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;long-text&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;placeholder&quot;:&quot;&quot;,&quot;rows_count&quot;:4},&quot;condition&quot;:{&quot;question&quot;:&quot;1629817096385&quot;,&quot;operator&quot;:&quot;equal&quot;,&quot;value&quot;:&quot;happy&quot;}},{&quot;uid&quot;:1629817169804,&quot;name&quot;:&quot;The reasons for angry&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;long-text&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;placeholder&quot;:&quot;&quot;,&quot;rows_count&quot;:4},&quot;condition&quot;:{&quot;question&quot;:&quot;1629817096385&quot;,&quot;operator&quot;:&quot;equal&quot;,&quot;value&quot;:&quot;angry&quot;}},{&quot;uid&quot;:1629817253142,&quot;name&quot;:&quot;Are you like this plugin?&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;like-dislike&quot;,&quot;is_required&quot;:true,&quot;condition&quot;:{&quot;question&quot;:&quot;1629816797297&quot;,&quot;operator&quot;:&quot;is_not_null&quot;,&quot;value&quot;:&quot;&quot;}},{&quot;uid&quot;:1629817304822,&quot;name&quot;:&quot;Give us a review&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;rating-stars&quot;,&quot;is_required&quot;:true,&quot;condition&quot;:{&quot;question&quot;:&quot;1629817253142&quot;,&quot;operator&quot;:&quot;equal&quot;,&quot;value&quot;:&quot;like&quot;},&quot;options&quot;:{&quot;show_value&quot;:&quot;on&quot;,&quot;show_tooltip&quot;:&quot;on&quot;,&quot;stars_count&quot;:&quot;5&quot;}},{&quot;uid&quot;:1629817526456,&quot;name&quot;:&quot;What is the programming we use ?&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;checkbox-list&quot;,&quot;is_required&quot;:true,&quot;options&quot;:{&quot;answers&quot;:[{&quot;label&quot;:&quot;PHP&quot;},{&quot;label&quot;:&quot;JavaScript&quot;},{&quot;label&quot;:&quot;jQuery&quot;},{&quot;label&quot;:&quot;AngularJS&quot;}]},&quot;condition&quot;:{&quot;question&quot;:&quot;1629817253142&quot;,&quot;operator&quot;:&quot;equal&quot;,&quot;value&quot;:&quot;like&quot;}},{&quot;uid&quot;:1629817589595,&quot;name&quot;:&quot;Your love for PHP&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;rating-hearts&quot;,&quot;is_required&quot;:true,&quot;condition&quot;:{&quot;question&quot;:&quot;1629817526456&quot;,&quot;operator&quot;:&quot;in&quot;,&quot;value&quot;:[&quot;PHP&quot;]},&quot;options&quot;:{&quot;show_value&quot;:&quot;on&quot;,&quot;show_tooltip&quot;:&quot;on&quot;,&quot;hearts_count&quot;:&quot;5&quot;}},{&quot;uid&quot;:1629817639508,&quot;name&quot;:&quot;Your love for JavaScript&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;rating-hearts&quot;,&quot;is_required&quot;:true,&quot;condition&quot;:{&quot;question&quot;:&quot;1629817526456&quot;,&quot;operator&quot;:&quot;in&quot;,&quot;value&quot;:[&quot;JavaScript&quot;]},&quot;options&quot;:{&quot;show_value&quot;:&quot;on&quot;,&quot;show_tooltip&quot;:&quot;on&quot;,&quot;hearts_count&quot;:&quot;5&quot;}},{&quot;uid&quot;:1629817655487,&quot;name&quot;:&quot;Your love for jQuery&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;rating-hearts&quot;,&quot;is_required&quot;:true,&quot;condition&quot;:{&quot;question&quot;:&quot;1629817526456&quot;,&quot;operator&quot;:&quot;in&quot;,&quot;value&quot;:[&quot;jQuery&quot;]},&quot;options&quot;:{&quot;show_value&quot;:&quot;on&quot;,&quot;show_tooltip&quot;:&quot;on&quot;,&quot;hearts_count&quot;:&quot;5&quot;}},{&quot;uid&quot;:1629817672085,&quot;name&quot;:&quot;Your love for AngularJS&quot;,&quot;help&quot;:&quot;&quot;,&quot;type&quot;:&quot;rating-hearts&quot;,&quot;is_required&quot;:true,&quot;condition&quot;:{&quot;question&quot;:&quot;1629817526456&quot;,&quot;operator&quot;:&quot;in&quot;,&quot;value&quot;:[&quot;AngularJS&quot;]},&quot;options&quot;:{&quot;show_value&quot;:&quot;on&quot;,&quot;show_tooltip&quot;:&quot;on&quot;,&quot;hearts_count&quot;:&quot;5&quot;}}],&quot;created_at&quot;:&quot;2021-08-25 [ 12:00 AM ]&quot;,&quot;updated_at&quot;:&quot;2023-11-03 [ 12:45 PM ]&quot;}\"\n     data-survey-id=\"6\" data-auto-next=\"false\"\n     data-survey-view=\"all-in-one\" data-survey-show-answers=\"true\">\n            <div class=\"ah-survey-front-title\" ng-bind-html=\"Survey.data.title\"><\/div>\n        <div class=\"ah-survey-front-description\" ng-if=\"Survey.data.description\" ng-bind-html=\"Survey.data.description\"><\/div>\n        <div ng-if=\"!Survey.data.description\" style=\"height:15px;\"><\/div>\n                                                        <div class=\"ah-survey-front-end-message\" ng-if=\"Survey.is_end\" ng-bind-html=\"(Survey.data.end_message)?Survey.data.end_message:'Thank you for your response'\"><\/div>\n                    <div ng-if=\"Survey.data.allow_add_response\">\n    <div ng-if=\"!Survey.is_end\">\n        <div ng-if=\"Survey.data.response_type=='anonymized' ||  (Survey.data.response_type=='registered' && is_user_logged_in)\">\n                        <form action=\"https:\/\/themes.tatwerat.com\/ah-survey\/wp-admin\/admin-ajax.php\" method=\"POST\" data-action=\"survey_submit\"\n                  data-nonce=\"fa72203482\" data-id=\"6\" ng-submit=\"Survey.submit($event);\" class=\"ah-survey-submit-form\">\n                <input type=\"hidden\" name=\"action\" value=\"survey_submit\">\n                <input type=\"hidden\" name=\"nonce\" value=\"fa72203482\">\n                <ul class=\"ah-list-unstyled ah-survey-questions-list\">\n                    <li id=\"question-{{ question.uid }}\" class=\"ah-survey-question\"\n                        data-question-page=\"{{ $index }}\"\n                        data-question-id=\"S6Q{{ question.uid }}\"\n                        data-question-required=\"{{ question.is_required }}\"\n                        ng-repeat=\"question in Survey.questions \"\n                            ng-if=\"question_show_if_condition(question,Survey.answers[Survey.data.id],Survey.data.id)\">\n                        <div class=\"ah-survey-question-title\">\n                            {{ question.name }}\n                            <span ng-if=\"question.is_required\" tooltip=\"Mandatory\">*<\/span>\n                        <\/div>\n                        <div ng-if=\"question.help\" class=\"ah-survey-question-help\">\n                            <div ng-bind-html=\"question.help | trustHTML\"><\/div>\n                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='short-text'\">\n                            <input type=\"text\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\" name=\"questions[{{ question.uid }}]\" ng-if=\"question.options.input_mask=='text'\" class=\"ah-form-control\" placeholder=\"{{ question.options.placeholder }}\">\n<input type=\"text\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\" name=\"questions[{{ question.uid }}]\" ng-if=\"question.options.input_mask=='number'\" oninput=\"if(this.value)this.value=this.value.replace(\/[^0-9]\/g, '');\" class=\"ah-form-control\" placeholder=\"{{ question.options.placeholder }}\">\n<input type=\"text\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\" name=\"questions[{{ question.uid }}]\" ng-if=\"question.options.input_mask=='date_time'\" class=\"ah-form-control ah-date-time-picker\" placeholder=\"{{ question.options.placeholder }}\">\n<input type=\"text\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\" name=\"questions[{{ question.uid }}]\" ng-if=\"question.options.input_mask=='date'\" class=\"ah-form-control ah-date-picker\" placeholder=\"{{ question.options.placeholder }}\">\n<input type=\"text\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\" name=\"questions[{{ question.uid }}]\" ng-if=\"question.options.input_mask=='time'\" class=\"ah-form-control ah-time-picker\" placeholder=\"{{ question.options.placeholder }}\">                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='slider'\">\n                            <div class=\"range-wrap\">\n    <div class=\"range-value\"><\/div>\n    <input type=\"range\" step=\"{{ question.options.step_value }}\" min=\"{{ question.options.min_value }}\" max=\"{{ question.options.max_value }}\"\n           ng-model=\"Survey.answers[Survey.data.id][question.uid]\" class=\"ah-custom-range\" name=\"questions[{{ question.uid }}]\" style=\"display:none;\">\n<\/div>\n<script>\n    setTimeout(() => {\n        jQuery('.ah-custom-range').each(function () {\n            const $scope = angular.element(jQuery(this)).scope();\n            if ($scope) {\n                const range = jQuery(this), rangeV = jQuery(this).prev(), setValue = () => {\n                    const newValue = Number((range.val() - range.attr('min')) * 100 \/ (range.attr('max') - range.attr('min'))), newPosition = 10 - (newValue * 0.2);\n                    rangeV.html(`<span>${range.val()}<\/span>`);\n                    rangeV.css('left', `calc(${newValue}% + (${newPosition}px))`);\n                };\n                range.on('input', setValue);\n                jQuery(this).delay(50).show().val($scope.question.options.min_value).trigger('input');\n            }\n        });\n    }, 50);\n<\/script>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='long-text'\">\n                            <textarea ng-model=\"Survey.answers[Survey.data.id][question.uid]\" class=\"ah-form-control\" rows=\"{{ question.options.rows_count }}\"\n          name=\"questions[{{ question.uid }}]\" placeholder=\"{{ question.options.placeholder }}\"><\/textarea>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='dropdown'\">\n                            <select ng-model=\"Survey.answers[Survey.data.id][question.uid]\" name=\"questions[{{ question.uid }}]\" data-placeholder=\"Please Choose ...\" class=\"chosen-select\">\n    <option selected hidden disabled><\/option>\n    <option ng-repeat=\"answer in question.options.answers\" value=\"{{ answer.label }}\">{{ answer.label }}<\/option>\n<\/select>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='points5'\">\n                            <div class=\"ah-custom-control ah-custom-radio ah-custom-control-inline\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" checked class=\"ah-custom-control-input\"\n           name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_count_1\" value=\"1\">\n    <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_emoji_count_1\">1<\/label>\n<\/div>\n<div class=\"ah-custom-control ah-custom-radio ah-custom-control-inline\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" class=\"ah-custom-control-input\"\n           name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_count_2\" value=\"2\">\n    <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_emoji_count_2\">2<\/label>\n<\/div>\n<div class=\"ah-custom-control ah-custom-radio ah-custom-control-inline\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" class=\"ah-custom-control-input\"\n           name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_count_3\" value=\"3\">\n    <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_emoji_count_3\">3<\/label>\n<\/div>\n<div class=\"ah-custom-control ah-custom-radio ah-custom-control-inline\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" class=\"ah-custom-control-input\"\n           name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_count_4\" value=\"4\">\n    <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_emoji_count_4\">4<\/label>\n<\/div>\n<div class=\"ah-custom-control ah-custom-radio ah-custom-control-inline\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" class=\"ah-custom-control-input\"\n           name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_count_5\" value=\"5\">\n    <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_emoji_count_5\">5<\/label>\n<\/div>\n<div class=\"ah-custom-control ah-custom-radio ah-custom-control-inline\" ng-if=\"question.options.no_answer\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" class=\"ah-custom-control-input\"\n           name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_count_no_answer\" value=\"No Answer\">\n    <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_emoji_count_no_answer\">No Answer<\/label>\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='buttons'\">\n                            <div class=\"ah-question-buttons\">\n    <button type=\"button\" data-value=\"{{ answer.label }}\" class=\"ah-btn ah-btn-outline-primary\" ng-repeat=\"answer in question.options.answers\" ng-class=\"(Survey.answers[Survey.data.id][question.uid]==answer.label)?'active':''\" ng-click=\"question.options.is_other=false\">\n        {{ answer.label }}\n    <\/button>\n    <button type=\"button\" data-value=\"other-btn\" class=\"ah-btn ah-btn-outline-primary\" ng-if=\"question.options.other\" ng ng-class=\"(question.options.is_other)?'active':''\" ng-click=\"question.options.is_other=true\">\n        Other\n    <\/button>\n<\/div>\n<div class=\"mt-3\" ng-show=\"question.options.is_other\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"text\" name=\"questions[{{ question.uid }}]\" class=\"ah-form-control\">\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='emoji'\">\n                            <div ng-if=\"question.options.emoji_count=='2'\">\n    <div class=\"ah-question-emoji sad\" tooltip=\"Sad\">\n        <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_sad\" value=\"sad\">\n        <label for=\"question_{{ question.uid }}_emoji_sad\"><\/label>\n    <\/div>\n    <div class=\"ah-question-emoji happy\" tooltip=\"Happy\">\n        <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_happy\" value=\"happy\">\n        <label for=\"question_{{ question.uid }}_emoji_happy\"><\/label>\n    <\/div>\n<\/div>\n<div ng-if=\"question.options.emoji_count=='5'\">\n    <div class=\"ah-question-emoji angry\" tooltip=\"Angry\">\n        <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_angry\" value=\"angry\">\n        <label for=\"question_{{ question.uid }}_emoji_angry\"><\/label>\n    <\/div>\n    <div class=\"ah-question-emoji sad\" tooltip=\"Sad\">\n        <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_sad\" value=\"sad\">\n        <label for=\"question_{{ question.uid }}_emoji_sad\"><\/label>\n    <\/div>\n    <div class=\"ah-question-emoji normal\" tooltip=\"Normal\">\n        <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_normal\" value=\"normal\">\n        <label for=\"question_{{ question.uid }}_emoji_normal\"><\/label>\n    <\/div>\n    <div class=\"ah-question-emoji happy\" tooltip=\"Happy\">\n        <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_happy\" value=\"happy\">\n        <label for=\"question_{{ question.uid }}_emoji_happy\"><\/label>\n    <\/div>\n    <div class=\"ah-question-emoji very-happy\" tooltip=\"Very Happy\">\n        <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_emoji_very_happy\" value=\"very-happy\">\n        <label for=\"question_{{ question.uid }}_emoji_very_happy\"><\/label>\n    <\/div>\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='like-dislike'\">\n                            <div class=\"ah-question-like\" tooltip=\"Like\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\"\n           id=\"question_{{ question.uid }}_like\" value=\"like\">\n    <label for=\"question_{{ question.uid }}_like\"><\/label>\n<\/div>\n<div class=\"ah-question-dislike\" tooltip=\"Dislike\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"radio\" name=\"questions[{{ question.uid }}]\"\n           id=\"question_{{ question.uid }}_dislike\" value=\"dislike\">\n    <label for=\"question_{{ question.uid }}_dislike\"><\/label>\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" style=\"overflow:hidden;\" ng-class=\"question.type\" ng-if=\"question.type=='rating-hearts'\" data-question-page=\"{{ $index+1 }}\">\n                            <div class=\"ah-question-hearts\">\n    <ah-ng-hearts-rating question-id=\"question.uid\" question-options=\"question.options\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\"><\/ah-ng-hearts-rating>\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" style=\"overflow:hidden;\" ng-class=\"question.type\" ng-if=\"question.type=='rating-stars'\" data-question-page=\"{{ $index+1 }}\">\n                            <div class=\"ah-question-stars\">\n    <ah-ng-stars-rating question-id=\"question.uid\" question-options=\"question.options\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\"><\/ah-ng-stars-rating>\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='radio-list'\">\n                            <div ng-class={'ah-survey-radio-list-inline':(question.options.display_type=='inline')}>\n    <div class=\"ah-custom-control ah-custom-radio mb-3\" ng-repeat=\"answer in question.options.answers\">\n        <input type=\"radio\" class=\"ah-custom-control-input\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_radio_list_{{ $index+1 }}\" ng-model=\"Survey.answers[Survey.data.id][question.uid]\" value=\"{{ answer.label }}\">\n        <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_radio_list_{{ $index+1 }}\">\n            {{ answer.label }}\n        <\/label>\n    <\/div>\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='buttons-list'\">\n                            <div class=\"ah-custom-buttons-list\">\n    <div class=\"ah-custom-buttons-list-input-group\" ng-repeat=\"answer in question.options.answers\">\n        <input type=\"radio\" name=\"questions[{{ question.uid }}]\" id=\"question_{{ question.uid }}_radio_list_{{ $index+1 }}\"\n               ng-model=\"Survey.answers[Survey.data.id][question.uid]\" value=\"{{ answer.label }}\">\n        <label for=\"question_{{ question.uid }}_radio_list_{{ $index+1 }}\">{{ answer.label }}<\/label>\n    <\/div>\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='photo-list'\">\n                            <div class=\"ah-questions-photo-list ah-question-display-{{ question.options.display_type }}  ah-question-size-{{ question.options.display_size }}\">\n    <ul class=\"ah-list-unstyled\">\n        <li ng-repeat=\"answer in question.options.answers\" tooltip=\"{{ answer.label }}\">\n            <div class=\"img\" data-value=\"{{ answer.label }}\"\n                 style=\"{{ (question.options.display_size=='custom')?'width:'+question.options.display_custom_size.width+'px;height:'+question.options.display_custom_size.height+'px':'' }}\">\n                <img ng-src=\"{{ answer.photo }}\" alt=\"{{ answer.label }}\"\n                     style=\"{{ (question.options.display_size=='custom')?'width:'+(question.options.display_custom_size.width-20)+'px;height:'+(question.options.display_custom_size.height-20)+'px':'' }}\">\n            <\/div>\n            <div class=\"answer-label\">{{ answer.label }}<\/div>\n        <\/li>\n    <\/ul>\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid]\" type=\"text\" name=\"questions[{{ question.uid }}]\">\n<\/div>                        <\/div>\n                        <div class=\"ah-survey-question-type\" ng-class=\"question.type\" ng-if=\"question.type=='checkbox-list'\">\n                            <div class=\"ah-custom-control ah-custom-checkbox mb-3\" ng-repeat=\"answer in question.options.answers\">\n    <input ng-model=\"Survey.answers[Survey.data.id][question.uid][answer.label]\" type=\"checkbox\" class=\"ah-custom-control-input\" name=\"questions[{{ question.uid }}][]\"\n           id=\"question_{{ question.uid }}_radio_list_{{ $index+1 }}\" value=\"{{ answer.label }}\">\n    <label class=\"ah-custom-control-label\" for=\"question_{{ question.uid }}_radio_list_{{ $index+1 }}\">\n        {{ answer.label }}\n    <\/label>\n<\/div>                        <\/div>\n                        <div ng-if=\"Survey.show_input_error && question.is_required && !Survey.answers[Survey.data.id][question.uid]\"\n                             class=\"ah-question-error\">\n                            Question answer required or invalid answer\n                        <\/div>\n                    <\/li>\n                <\/ul>\n                                    <div class=\"p-3 pt-0 text-right\">\n                        <button type=\"submit\" class=\"ah-btn ah-btn-lg ah-btn-primary ah-btn-submit-survey\" ng-class=\"(Survey.submit_loading)?'ah-btn-spinner':''\"\n                                ng-disabled=\"Survey.submit_loading\">\n                            <span>Submit Survey<\/span>\n                        <\/button>\n                    <\/div>\n                            <\/form>\n        <\/div>\n        <div ng-if=\"!is_user_logged_in && Survey.data.response_type=='registered'\">\n            <div class=\"ah-row\">\n                <div class=\"ah-col-md-12\">\n                    <form action=\"https:\/\/themes.tatwerat.com\/ah-survey\/wp-admin\/admin-ajax.php\" method=\"POST\" ng-submit=\"Survey.login($event);\" class=\"ah-survey-login-form\" novalidate>\n                        <div class=\"ah-alert ah-alert-warning\">\n                            Survey showing for logged users only\n                        <\/div>\n                        <input type=\"hidden\" name=\"action\" value=\"survey_login\">\n                        <input type=\"hidden\" name=\"nonce\" value=\"5da31a2240\">\n                        <div class=\"ah-row\">\n                            <div class=\"ah-col-md-4\">\n                                <div class=\"ah-form-group\">\n                                    <label class=\"ah-form-label\" for=\"ah_survey_username\">Username<\/label>\n                                    <input type=\"text\" class=\"ah-form-control\" id=\"ah_survey_username\" name=\"ah_survey_username\" required>\n                                <\/div>\n                            <\/div>\n                            <div class=\"ah-col-md-4\">\n                                <div class=\"ah-form-group\">\n                                    <label class=\"ah-form-label\" for=\"ah_survey_password\">Password<\/label>\n                                    <input type=\"password\" class=\"ah-form-control\" id=\"ah_survey_password\" name=\"ah_survey_password\" required>\n                                <\/div>\n                            <\/div>\n                            <div class=\"ah-col-md-4\">\n                                <button type=\"submit\" ng-disabled=\"Survey.login_load\" style=\"margin-top:37px\" class=\"ah-btn ah-btn-block ah-btn-primary\">\n                                    Login\n                                <\/button>\n                            <\/div>\n                            <div style=\"color:#e9282b;padding:0px 15px;\" ng-if=\"Survey.login_errors && Survey.login_errors.message\">\n                                <i style=\"position:relative;top:2px;\" class=\"dashicons dashicons-warning\"><\/i> <span ng-bind-html=\"Survey.login_errors.message\"><\/span>\n                            <\/div>\n                        <\/div>\n                    <\/form>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n<div ng-if=\"!Survey.data.allow_add_response\">\n    <div class=\"ah-survey-front-content\">\n        <div class=\"ah-alert ah-alert-warning\">\n            <h3 class=\"mt-0 mb-2\">Thank you<\/h3>\n            <span class=\"font-400\">You have submitted your response before<\/span>\n        <\/div>\n    <\/div>\n<\/div>                \n                                    <ul class=\"ah-list-unstyled ah-survey-questions-list\" ng-if=\"Survey.is_end\">\n    <li class=\"ah-survey-question\" ng-repeat=\"(question,answer) in Survey.validate_answers[Survey.data.id]\" ng-if=\"Survey.validate_answers && Survey.validate_answers[Survey.data.id]\">\n        <div class=\"ah-survey-question-title\">{{ Survey.get_question_by_id(question).name }}<\/div>\n        <div ng-if=\"answer\">\n            <div ng-switch=\"Survey.get_question_by_id(question).type\">\n                <div ng-switch-when=\"emoji\" style=\"display:inline-block;\" tooltip=\"{{ Survey.get_question_emoji_text(answer) }}\">\n                    <img ng-src=\"https:\/\/themes.tatwerat.com\/ah-survey\/wp-content\/plugins\/ah-survey\/assets\/images\/response-icons\/emoji-{{ answer }}.png\" style=\"height:32px;width:auto;display:block;box-shadow:none;border-radius:0px;\">\n                <\/div>\n                <div ng-switch-when=\"like-dislike\" style=\"display:inline-block;\" tooltip=\"{{ (answer==&#039;like&#039;)?&#039;Like&#039;:&#039;Dislike&#039; }}\">\n                    <img ng-src=\"https:\/\/themes.tatwerat.com\/ah-survey\/wp-content\/plugins\/ah-survey\/assets\/images\/response-icons\/{{ answer }}.png\" style=\"height:32px;width:auto;display:block;box-shadow:none;border-radius:0px;\">\n                <\/div>\n                <div ng-switch-when=\"rating-hearts\" style=\"display:inline-block;\" tooltip=\"{{ answer }} {{ (answer&lt;=1)?&#039;Heart&#039;:&#039;Hearts&#039; }}\">\n                    <img ng-repeat=\"heart in range_ascending(1,Survey.get_question_by_id(question).options.hearts_count)\" ng-src=\"https:\/\/themes.tatwerat.com\/ah-survey\/wp-content\/plugins\/ah-survey\/assets\/images\/response-icons\/heart{{ (heart<=answer)?'-active':'' }}.png\" tooltip=\"{{ answer }}\" style=\"height:32px;width:auto;display:inline-block;margin-left:5px;box-shadow:none;border-radius:0px;\">\n                    <span style=\"display:inline-block;font-size: 18px;font-weight: 700;margin-left: 10px;position: relative;top: -9px;\">({{ answer }}\/{{ Survey.get_question_by_id(question).options.hearts_count }})<\/span>\n                <\/div>\n                <div ng-switch-when=\"rating-stars\" style=\"display:inline-block;\" tooltip=\"{{ answer }} {{ (answer&lt;=1)?&#039;Star&#039;:&#039;Stars&#039; }}\">\n                    <img ng-repeat=\"star in range_ascending(1,Survey.get_question_by_id(question).options.stars_count)\" ng-src=\"https:\/\/themes.tatwerat.com\/ah-survey\/wp-content\/plugins\/ah-survey\/assets\/images\/response-icons\/star{{ (star<=answer)?'-active':'' }}.png\" tooltip=\"{{ answer }}\" style=\"height:32px;width:auto;display:inline-block;margin-left:5px;box-shadow:none;border-radius:0px;\">\n                    <span style=\"display:inline-block;font-size: 18px;font-weight: 700;margin-left: 10px;position: relative;top: -9px;\">({{ answer }}\/{{ Survey.get_question_by_id(question).options.stars_count }})<\/span>\n                <\/div>\n                <div ng-switch-when=\"photo-list\" style=\"display:inline-block;\">\n                    <div ng-repeat=\"sub_answer in Survey.get_question_by_id(question).options.answers\" ng-if=\"answer == sub_answer.label\">\n                        <img ng-src=\"{{ sub_answer.photo }}\" style=\"height:32px;width:auto;display:block;float:left;margin-right:10px;box-shadow:none;border-radius:0px;\">\n                        <span style=\"display:inline-block;margin-top:5px;\">{{ sub_answer.label }}<\/span>\n                    <\/div>\n                <\/div>\n                <div ng-switch-when=\"checkbox-list\" style=\"display:inline-block;\">\n                    <span ng-repeat=\"(key,value) in answer\" ng-if=\"value==true\" style=\"border:1px solid #dddddd;display:inline-block;padding:4px 10px;margin:5px;\">\n                        {{key }}\n                    <\/span>\n                <\/div>\n                <div ng-switch-default>\n                    <b>{{ answer }}<\/b>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div ng-if=\"!answer\">\n            <b style=\"color:#d7670b;\">No Answer<\/b>\n        <\/div>\n    <\/li>\n<\/ul>                                        <\/div>\n","protected":false},"excerpt":{"rendered":"{{ question.name }} * {{ answer.label }} 1 2 3 4 5 No Answer {{ answer.label }} Other {{ answer.label }} {{ answer.label }} {{ answer.label }} {{ answer.label }} Question answer required or invalid answer Submit Survey Survey showing for logged users only Username Password Login Thank you You have submitted your response before [...]","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-54","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=\/wp\/v2\/pages\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":1,"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=\/wp\/v2\/pages\/54\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=\/wp\/v2\/pages\/54\/revisions\/55"}],"wp:attachment":[{"href":"https:\/\/themes.tatwerat.com\/ah-survey\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}