Hi,
I am attempting to create a group of checkboxes dynamically based upon a prior selection that filters the items to be displayed as checkboxes. I have been able to filter and render my checkboxes as I require so that the html looks just like a similar checkbox group created in the usual manner. I started my own function based on this,
www.rsjoomla.com/support/documentation/r...e-form-example-.html
My issue is that my rendered checkboxes do not have a RSF JS event attached to them so that when one of my generated boxes is ticked RSF processing that is normally triggered on the change in the selection is not occurring. My checkboxes will have prices attached to them therefore I need the normal processing to execute.
The JS event that is not being attached is found in ..\media\com_rsform\js\script.min.js
function() {
if (typeof func === "function") {
func()
}
}
Initially my Checkbox group creates this html from a field, access_items, created in the form the normal way however I have noting entered in the Items field.
<div class="uk-margin rsform-block rsform-block-access-items rsform-type-checkboxgroup">
<label class="uk-form-label formControlLabel" id="access_items-grouplbl">Items Available</label>
<div class="formControls uk-form-controls" role="group" aria-labelledby="access_items-grouplbl">
<span class="formValidation">
<span id="component271" class="formNoError">Invalid Input</span>
</span>
</div>
</div>
Upon selecting an entry from a prior drop down I trigger an 'onChange' action and my JS function executes and adds child elements to the above html to create this
<div class="uk-margin rsform-block rsform-block-access-items rsform-type-checkboxgroup">
<label class="uk-form-label formControlLabel" id="access_items-grouplbl">Items Available</label>
<div class="formControls uk-form-controls" role="group" aria-labelledby="access_items-grouplbl">
<span class="formValidation"><span id="component271" class="formNoError">Invalid Input</span></span>
<label id="access_items0-lbl">
<input type="checkbox" name="form[access_items][]" id="access_items0" value="11" class="rsform-checkbox uk-checkbox">
</label>
<label id="access_items1-lbl">
<input type="checkbox" name="form[access_items][]" id="access_items1" value="4" class="rsform-checkbox uk-checkbox">
</label>
<label id="access_items2-lbl">
<input type="checkbox" name="form[access_items][]" id="access_items2" value="9" class="rsform-checkbox uk-checkbox">
</label>
</div>
</div>
While my 'control' checkbox group that I am using for comparison on the same form has html that looks like this
<div class="uk-margin rsform-block rsform-block-access-items rsform-type-checkboxgroup">
<label class="uk-form-label formControlLabel" id="access_items-grouplbl">Items Available</label>
<div class="formControls uk-form-controls" role="group" aria-labelledby="access_items-grouplbl">
<span class="formValidation"><span id="component271" class="formNoError">Invalid Input</span></span>
<label id="access_items0-lbl">
<input type="checkbox" name="form[access_items][]" id="access_items0" value="11" class="rsform-checkbox uk-checkbox">
</label>
<label id="access_items1-lbl">
<input type="checkbox" name="form[access_items][]" id="access_items1" value="4" class="rsform-checkbox uk-checkbox">
</label>
<label id="access_items2-lbl">
<input type="checkbox" name="form[access_items][]" id="access_items2" value="9" class="rsform-checkbox uk-checkbox">
</label>
</div>
</div>
Looking at the browsers Inspector I can see an event attached to each input element of the 'control' checkbox group that is not attached to the input elements of my generated elements.
Therefore my question is, 'How can I get that event added to my generated input elements?'
Terry