Preload activity for web app not working for Boolean fields added to recepient | Community
Skip to main content
Prasanna_Soni
Level 4
May 20, 2021 1:47 PM UTC
Solved

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

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>

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
May 20, 2021 5:12 PM UTC

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> <% } %>
     Manoj     Find me on LinkedIn

2 replies

Sukrity_Wadhwa
Employee
Jun 2, 2021 12:00 PM UTC

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!

Translate
Sukrity Wadhwa
_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
May 20, 2021 5:12 PM UTC

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> <% } %>
Translate
     Manoj     Find me on LinkedIn