Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Preloading values not reflected in front end webapp checkbox

Avatar

Employee
Has anyone had a similar problem when preloading a record on a webapp, the context shows the correct value, but this is not reflected in the html object? I am using the new page activity: DAVID-GARCIA_2-1610550485724.png

 

 
_debug shows ctx context preloaded with flag correctly
 
DAVID-GARCIA_0-1610550398665.png

 

 
On the webapp frontend the checkbox is not checked.....
 
DAVID-GARCIA_1-1610550398666.png

 

Input form syntax:
 
<input id="uni_news" type="checkbox" checked="checked" data-nl-bindto="xpath" data-nl-xpath="@universityNews" />
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Community Advisor

Hello @DAVID-GARCIA ,

 

Yes, I was facing a similar issue.

 

I solved it by updating the checkbox value with javascript

 

Here is a sample code

<% if(ctx.vars.value=="1"){ %>
<Script>
document.getElementById("checkbox").checked = true;
</script>
<% }% >

 

Thanks,

Manoj

 

Avatar

Employee
I can see this issue only affects when using a custom schema, I am testing another webapp which preloads data from the recipient table and the data preloads just fine.

Avatar

Community Advisor
I am not sure but I think custom schema does not go well with the data-nl tags

Avatar

Employee

Yeah that seems to be the case, wondering why noone from engineering is fixing this issue, I think the issue is only with the checkboxes and possible radios, as the data preloads fine to a text input type when is a string, but not checkboxes.

Avatar

Employee

Hi Manoj, I can't seem to reply to you, I am also inclined to use that approach as I had spent the last 24 hours troubleshooting the issue to no avail, does that mean this is an actual bug?