Hi! I need to create items with questions and in one question I need to give posibilitys to chooce 2 - 4 answers. So my question is if its possible to create items field in items field? So I can choose witch- and how many answare its should be on eatch of my questions in admin?
I would like to build similar to this screenshot. There you choose question and answare (2-4 answare). Du you see any solution to that? Is there possible on any way to have radio-buttons and in back-end I have forexample 4 text-field, and if one or more is emty then hide that input?
Im not talking about form solutions! I just see if its any work around this. For example if i leave empty text-field can I hide one of inputs with css or something?
Like you see I have 4 radio buttons as answare on a questions. Im thinking to have 4 text-field in the item, who is text for this answare. My goal is if some of this text-field is empty I want to hide that radio-button.
But if I have multi selectors in my js I need to isolate. Its seems to be same id? And not working? I would appreciate if you would help me with this, I have deadline after few hours
This is the end page: https://foreldrelandsbyen.viralmedia.no/erstatningstesten/ Like you see its four buttons who goes to popups and there I have the widget Im trying to crate. Its a form-based calculator, who based on created question and ansvare and probability in scale from 1-10 gives then a statistics animasion and answare. I think I have work out the widget and got it to work like it should. But the only problem I have now is that its not isolated, so if I have two or three of this widget on the same page (witch I need) so begins the forms interact with eathother and the statistic answares whent to be wrong.
var name = jQuery(this).attr("name"); var myMaxScore = parseInt(jQuery(this).attr("data-max-score")); var score = parseInt(jQuery(this).attr("data-score")); var response = jQuery(this).attr("data-return-text");
if (response) { responseParagraphs.push(response); }
totalScore = totalScore + score;
maxScore = maxScore + myMaxScore;
percent = (totalScore * 100) / maxScore; });
Like you see its take info from html- attribut. How do I do in this case?
Hi!
I need to create items with questions and in one question I need to give posibilitys to chooce 2 - 4 answers. So my question is if its possible to create items field in items field? So I can choose witch- and how many answare its should be on eatch of my questions in admin?
sorry we dont have that option
I would like to build similar to this screenshot. There you choose question and answare (2-4 answare). Du you see any solution to that? Is there possible on any way to have radio-buttons and in back-end I have forexample 4 text-field, and if one or more is emty then hide that input?
i dont i am sorry
What do you meen with "i dont"? Is there anyone else there who maybe could help me? This is important, realy!
We dont have any form solutions. If i could help ofcourse i would help you.
Im not talking about form solutions! I just see if its any work around this. For example if i leave empty text-field can I hide one of inputs with css or something?
https://unlimited-elements.com/docs/twig-code-example-if-empty/
So you had a solution? ;)
Thank you!
Can I have dynamic id in items? So when I create new item it get random id?
its called
{{item.item_id}}
Im not geting "if empty" statement to work?
I send you a screenshot. Do I do anything wrong?
"fraga" is the name of the text-field.
The inlogg to the site is:
Url: https://foreldrelandsbyen.viralmedia.no/wp-admin/
user: support
password: EWQIPaLZL6Fu59(o@Dy9qLh8
Its on this page:
https://foreldrelandsbyen.viralmedia.no/test/
And the name of the widget is: Calcylator
Like you see I have 4 radio buttons as answare on a questions. Im thinking to have 4 text-field in the item, who is text for this answare. My goal is if some of this text-field is empty I want to hide that radio-button.
Have you been in on the wordpress site?
Hi Max!
I try if else but its not working eather?
Is there anything wrong in my wordpress who does its not working? It should work in javascript file also?
Best regards,
Kaj
Do I need to have only html in the condition? or can I have javascript too?
Hi Max!
Thanks for answare!
Other thing ..
How can I isolate my widgets? So if I can have multi same widgets on One page without thay iteract with eatchother?
But if I have multi selectors in my js I need to isolate. Its seems to be same id? And not working?
I would appreciate if you would help me with this, I have deadline after few hours
Ok, thankyou so Max!
This is the end page:
https://foreldrelandsbyen.viralmedia.no/erstatningstesten/
Like you see its four buttons who goes to popups and there I have the widget Im trying to crate. Its a form-based calculator, who based on created question and ansvare and probability in scale from 1-10 gives then a statistics animasion and answare. I think I have work out the widget and got it to work like it should. But the only problem I have now is that its not isolated, so if I have two or three of this widget on the same page (witch I need) so begins the forms interact with eathother and the statistic answares whent to be wrong.
Here is the link to the popups;
https://foreldrelandsbyen.viralmedia.no/wp-admin/edit.php?post_type=jet-popup
And the widgets name is: Calculator
The inlog page is:
https://foreldrelandsbyen.viralmedia.no/wp-login.php
Username:
support
Password:
support123
I really like your plugin and can see the potential and really want to learn more!
Best regards;
Kaj
Ok, thanks Max!
So example..
Instead of doing:
var responseDiv = jQuery("#myResultContainer");
I do
var responseDiv = objCalculator.find("#myResultContainer");
Have I understod you right?
What about the tings in css- and html file then?
Also I have a function in my javascript who looks like this:
jQuery("input.QuestionFieldvalue:checked").each(function () {
var name = jQuery(this).attr("name");
var myMaxScore = parseInt(jQuery(this).attr("data-max-score"));
var score = parseInt(jQuery(this).attr("data-score"));
var response = jQuery(this).attr("data-return-text");
if (response) {
responseParagraphs.push(response);
}
totalScore = totalScore + score;
maxScore = maxScore + myMaxScore;
percent = (totalScore * 100) / maxScore;
});
Like you see its take info from html- attribut. How do I do in this case?
Best ragards,
Kaj
When I paste the code in Visual Studio Code editor, I got wrong on this place?