The CreatorCon Call for Content is officially open! Get started here.

Condition Builder in UI page

Community Alums
Not applicable

Hi all,

We have an UI Page for condition builder. On this UI Page, there is a filter that has this code ,

HTML code :

 

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
<input type="hidden" id="cancelled" name="cancelled" value="false"/>
<table width="100%" cellpadding="0" cellspacing="0">

<g:ui_element table="sys_script" field="collection" id="6d5f3906db011010140a7b60399619fc"></g:ui_element>
<g:ui_element table="sys_script" field="filter_condition" name ="filter_condition" id="8c9e7dc2db011010140a7b60399619f9"></g:ui_element>
</table>

<table width="100%" cellpadding="0" cellspacing="0">
<tr><td align="left" nowrap="true"><br /><g:dialog_buttons_ok_cancel ok="return validateForm();" cancel="return onCancel();" /> <g:sc_button id="test" title="title" label="save" onclick="save()" /></td></tr>
</table>
</g:ui_form>

</j:jelly>

 

 

Client Script:

 

addLoadEvent( function() {
document.getElementById("sys_script.collection").value = "sys_user";
document.getElementById("select2-chosen-1").innerHTML = "sys_user [sys_user]";
//document.getElementById("s2id_sys_script.collection").hide();
loadFilterColumns('sys_script.filter_condition', 'collection');
});

 But  want to save the filter condition in sys_filter table So,How to create a condition builder that allows users to select fields, operators, and values for conditions, and then saves the values of the conditions to a FilterTable in a UI page? @Community Alums

Screenshot 2023-07-31 125405.png

0 REPLIES 0