# Stimuli start condition ignored in pavlovia

**URL:** <https://discourse.psychopy.org/t/stimuli-start-condition-ignored-in-pavlovia/35856>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [July 26, 2023, 8:43am UTC](https://discourse.psychopy.org/t/stimuli-start-condition-ignored-in-pavlovia/35856 "2023-07-26T08:43:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![munizdiezclara](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/munizdiezclara/32/44368_2.png) [@munizdiezclara](https://discourse.psychopy.org/u/munizdiezclara)\
**Post date:** [July 26, 2023, 8:43am UTC](https://discourse.psychopy.org/t/stimuli-start-condition-ignored-in-pavlovia/35856/1 "2023-07-26T08:43:18Z")

</div>

URL of experiment: [Pavlovia](https://pavlovia.org/mdc/unm05_pilot)

PsychoPy version: 2022.2.4

Description of the problem:  
In this experiment, there is a test phase in which a rating scale is displayed. Once a response is made in that rating scale, a button that says continue is displayed so the participants can proceed to the next trial. This is controlled by including a code component on the routine in the Builder. In the Begin Routine tab, the code is:  
`show_consent = False`  
In the Each Frame tab, the code is:  
`s6 = slider_6.getRating() if s6 is not None: show_consent = True`  
In the text button component, the Start is set to condition (show\_content). This works when run on PsychoPy, but in Pavlovia the text button is displayed from the start of the routine. I cheked the JS code and the condition appears  
` if ((show\_consent) && consent\_box.status === PsychoJS.Status.NOT\_STARTED) {  
// keep track of start time/frame for later  
consent\_box.tStart = t; // (not accounting for frame time here)  
consent\_box.frameNStart = frameN; // exact frame index

```
  consent_box.setAutoDraw(true);
}`

```

---

<div class="post-metadata">

**Author:** ![munizdiezclara](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/munizdiezclara/32/44368_2.png) [@munizdiezclara](https://discourse.psychopy.org/u/munizdiezclara)\
**Post date:** [October 24, 2023, 8:30am UTC](https://discourse.psychopy.org/t/stimuli-start-condition-ignored-in-pavlovia/35856/2 "2023-10-24T08:30:47Z")

</div>

I was given the solution on a different topic.  
The solution is changing the Each Frame tab to:

```auto
s6 = silder_6.getRating()
if s6:
   show_consent = True

```
