Server-side processing results show up and quickly disapear

I am confused. I have been trying to keep my database access on the server side and use data retrieved from a database to modify controls that get returned to the client. I keep having a problem that whatever I modify on the server side always gets overridden by whatever the control was before it was modified by the server side code.

I have simplified the problem down to a single drop-down on a page and removed the database call and replaced it with hard coded data and the problem still occurs. The drop down is named #inpPurpose1 . When I publish the page and then try to view it, what I see is the ‘abc’ appears and the drop-down is populated for just a few seconds with the 1 and 2, and then it reverts to whatever was in the UI of the editor.

FYI… if I preview it in the editor it works (because all processing is on the client side).

I have a feeling I am not understanding the purpose of SSP. I have assumed that I could process my UI on the server side and return already bound controls to the client side but it appears that whatever is on the client side to begin with always wins. What am I missing?

$w.onReady( function () {
if (wixWindow.rendering.renderCycle === 1) {
$w(“#inpPurpose1”).options = [ {label:“1”,value:“1”}, {label:“2”,value:“2”} ]
$w(“#inpPurpose1”).placeholder = “abc”
}
});

Hi kidsintmin,

This is an issue on our side which is being taken care of.

A similar issue was recently brought up by another forum thread, take a look here:
https://www.wix.com/code/home/forum/community-discussion/the-elements-which-were-set-on-the-first-rendering-cycle-are-reverted-to-default-values-on-the-second-rendering-cycle.

We are taking care of this issue, and will notify once it is fixed.
Idan.