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

SOLVED

Preload activity for web app not working for Boolean fields added to recepient

Avatar

Level 4

Team, I have extended recipient schema and added couple Boolean fields and text fields. In webpage i am able to map that fields. Preload acivity is able to load the Text fields from Recipient however for Boolean fields, preload acivity is not working. Now value for Boolen fields could be problem as i see i gave true and false. That i dont know and might be changing to 1 or 0 might solve the problem. Anyone else faced the similar situation? 

 

<div class="control"><input name="radio-stacked" class="radio" id="typeOfJournalistMedia" required="true" type="radio" checked="checked" value="" data-nl-bindto="xpath" data-nl-label="Media" data-nl-xpath="@media" data-nl-ismandatory="false" data-nl-uncheckedvalue="false" /> <label class="form-check-label" for="typeOfJournalistMedia">Journalist/Media</label> <input name="radio-stacked" class="radio" id="typeOfJournalistNonMedia" required="" type="radio" checked="checked" value="true" data-nl-bindto="xpath" data-nl-label="Non Media" data-nl-xpath="@nonmedia" data-nl-ismandatory="false" data-nl-uncheckedvalue="false" /> <label class="form-check-label" for="typeOfJournalistNonMedia">Non-Media</label></div>

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Prasanna_Soni 

 

You can use the javascript to look at the boolean value and then check/uncheck the radio box.

 

<%
if(media==1 || media==true){
 %>
<script>
 document.getElementById("typeOfHournalistMedia").checked = true;
</script>
<%
}
%>

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @Prasanna_Soni 

 

You can use the javascript to look at the boolean value and then check/uncheck the radio box.

 

<%
if(media==1 || media==true){
 %>
<script>
 document.getElementById("typeOfHournalistMedia").checked = true;
</script>
<%
}
%>

Avatar

Administrator

Hi @Prasanna_Soni,

Was the given solution helpful to resolve your query or do you still need more help here? Do let us know.

Thanks!