0 votes
in SoSci Survey (English) by s194450 (130 points)
edited by SoSci Survey

Dear Sosci team
I want to feedback my participants' IAT score visually, using visual presentation. The example code that is used first calculates a mean and then does a z-transformation. I don't need to do this since my IAT scores are calculated automatically and I do not need them to be z-transformed and neither do they need to be positive. Therefore, I changed the PHP code to this:

// Determine the outcome value
 //IA01R02 is the variable of the IAT score

$value = value('IA01R02');       

//IA04 is the ID of the question including the HTML code 

show('IA04', array(         
  replace('%title%', 'implicit gender negotiation bias);
  replace('%value%', (string)round($value * 100));
  ));

I get an error message saying "For the placeholder %title% neither an input field by prepare_input() has been created nor any content by using replace()." and the same messae for %value%
Also, I get an error for the last line of code which I do not understand because it seems to me that my PHP code is complete.

Maybe you can help me out here?

by SoSci Survey (305k points)
If that is the PHP code that you use, it should not run at all, because there is a quotation mark missing in the replace('%title%'...) line.

1 Answer

0 votes
by SoSci Survey (305k points)

If using the show() command, please remove the replace().

show('IA04', array(         
  '%title%' => 'implicit gender negotiation bias',
  '%value%' => (string)round($value * 100);
));
by s194450 (130 points)
Thank you for this answer. I still get an error message saying that I should use the replace command...
"For the placeholder %title% neither an input field by prepare_input() has been created nor any content by using replace()."
"For the placeholder %value100% neither an input field by prepare_input() has been created nor any content by using replace()."
by SoSci Survey (305k points)
> For the placeholder %value100% neither an input field

Well, that is true. You have named the placeholder %value%, not %value100% in your PHP code. That has to be consistent.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...