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
Solved

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

  • May 20, 2021
  • 2 replies
  • 1030 views

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.
Best answer by Manoj_Kumar

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> <% } %>

2 replies

Manoj_Kumar
Community Advisor
Manoj_KumarCommunity AdvisorAccepted solution
Community Advisor
May 20, 2021

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  | https://themartech.pro
Sukrity_Wadhwa
Community Manager
Community Manager
June 2, 2021

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!

Sukrity Wadhwa