I have two separate forms I'm currently working on. Form 1 (Long Term Conditions) - Stores information. Form 2 - Populates with information from Form 1.
I'm trying to pull the text which sits alongside a checkbox from Form 1, to appear in a textbox on Form 2. So for example, if the checkbox for "Asthma" is ticked on Form 1, then display "Asthma" in a particular textbox on Form 2. The field name is "AsthmaID" in Form 1, but I am finding it difficult to just populate the word "Asthma" into Form 2.
UserDefinedJavascript.DefaultFromParent = function ()
{
var xmlDoc = StrandXML.CreateXMLDocument (UserDefinedJavascript.DocumentSetXML);
var LTCNodes = xmlDoc.getElementsByTagName("LongTermConditions");
if (LTCNodes.length > 0)
{
if (GetControl("AsthmaID").value = "1")
{
GetControl("ExistingLTCs").value = 'Asthma'
var str = GetControl("ExistingLTCs").value
var newstr = str.replace (/<\/?[^>]+(>|$)/g, "\n")
GetControl("ExistingLTCs").value = newstr
}
It would be greatly appreciated if somebody could help tell me where I'm going wrong and what I need to do, please!
Aucun commentaire:
Enregistrer un commentaire