Preload activity for web app not working for Boolean fields added to recepient | Adobe Higher Education
Skip to main content
Prasanna_Soni
Level 4
May 20, 2021
Respondido

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

  • May 20, 2021
  • 2 respostas
  • 1029 Visualizações

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>

 

Este tópico foi fechado para respostas.
Melhor resposta por _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 Respostas

_Manoj_Kumar_
Community Advisor
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     Find me on LinkedIn
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