Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Guidance needed creating multi-criteria search form with subform
Re: Guidance needed creating multi-criteria search form with subform
Thanks, I would very much appreciate that. I've used the cloner to clone the form (including objects and iframe form) but can't work out how to export it.
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Guidance needed creating multi-criteria search form with subform
When you hit "Run" in the cloner, a new Tab is opened containing the SQL. Then copy + paste it.
Re: Guidance needed creating multi-criteria search form with subform
Ok, here it is:
Code: Select all
-- nuBuilder cloner SQL Dump
-- Version 1.21
-- Generation Time: February 13, 2023 01:19:15 PM
-- Form Description: Property Search
-- Form Code: frm_propsearch
-- Form Table:
-- Form Type: launch
--
-- zzzzsys_form: frm_propsearch_clone_1
--
INSERT INTO zzzzsys_form (zzzzsys_form_id, sfo_type, sfo_code, sfo_description, sfo_breadcrumb_title, sfo_table, sfo_primary_key, sfo_browse_redirect_form_id, sfo_browse_row_height, sfo_browse_rows_per_page, sfo_browse_title_multiline, sfo_browse_autoresize_columns, sfo_browse_sql, sfo_javascript, sfo_browse_javascript, sfo_edit_javascript, sfo_style, sfo_mobile_view, sfo_json)
VALUES ( '63ea46e3ee30639', 'launch', 'frm_propsearch_clone_1', 'Property Search', NULL, '', '', '', '0', '0', '0', NULL, '', NULL, NULL, NULL, NULL, NULL, NULL );
--
-- zzzzsys_tab
--
INSERT INTO zzzzsys_tab (zzzzsys_tab_id, syt_zzzzsys_form_id, syt_title, syt_order, syt_help, syt_access, syt_json)
VALUES ( '63ea46e3ee6bb6a', '63ea46e3ee30639', 'Main', '10', NULL, NULL, NULL );
--
-- zzzzsys_object
--
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eede39f', '63ea46e3ee30639', 'Launch Form 1', 'input', 'prop_name_srch', 'Property Name', '63ea46e3ee6bb6a', '40', '12', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eee1cb4', '63ea46e3ee30639', 'Launch Form 1', 'input', 'unit_no_srch', 'Unit No', '63ea46e3ee6bb6a', '50', '44', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eee538c', '63ea46e3ee30639', 'Launch Form 1', 'input', 'unit_name_srch', 'Unit Name', '63ea46e3ee6bb6a', '60', '76', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eee8102', '63ea46e3ee30639', 'Launch Form 1', 'input', 'house_no_srch', 'House No', '63ea46e3ee6bb6a', '70', '108', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eeeae3e', '63ea46e3ee30639', 'Launch Form 1', 'input', 'road_name_srch', 'Road Name', '63ea46e3ee6bb6a', '80', '140', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eef73ab', '63ea46e3ee30639', 'Launch Form 1', 'input', 'postcode_srch', 'Postcode', '63ea46e3ee6bb6a', '90', '172', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eefa45a', '63ea46e3ee30639', '', 'run', 'iframe_proplist', 'Property List', '63ea46e3ee6bb6a', '30', '14', '344', '1000', '500', '1', 'left', '0', '0', '0', NULL, NULL, NULL, NULL, '63e6143c4903290', NULL, 'i', '', 'F', NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, '', NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eefcd21', '63ea46e3ee30639', '', 'input', 'btn_searchprops', 'Search', '63ea46e3ee6bb6a', '20', '211', '128', '80', '22', '1', 'left', '0', '0', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, 'button', NULL, NULL, NULL, '', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eeff64b', '63ea46e3ee30639', '', 'input', 'btn_resetsearch', 'Reset', '63ea46e3ee6bb6a', '10', '211', '224', '100', '22', '1', 'left', '0', '0', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, 'button', NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
--
-- zzzzsys_event
--
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript, sev_json)
VALUES ( '63ea46e3ef8fedf', '63ea46e3eefcd21', 'onclick', '// Add an event listener for all filter fields and if the user pressed the \"Search\" key, apply the search\n$(\"[search-field]\").each(function() {\n\n $(this).btn_searchprops(function(e) {\n applySearch();\n });\n\n});\n\nfunction applySearch() {\n\n var frame = $(\"#iframe_proplist\")[0].contentWindow; // <--- Replace your_iframe_object_id with your iframe object id\n\n // Set Hash Cookies (HK) for all filter fields:\n\n // Example: Set HKs for Text fields\n frame.nuSetProperty(\'prop_name_fltr\', prop_name_srch.value);\n frame.nuSetProperty(\'unit_no_fltr\', unit_no_srch.value);\n frame.nuSetProperty(\'unit_name_fltr\', unit_name_srch.value);\n frame.nuSetProperty(\'house_no_fltr\', house_no_srch.value);\n frame.nuSetProperty(\'road_name_fltr\', road_name-srch.value);\n frame.nuSetProperty(\'postcode_fltr\', postcode_srch.value);\n\n // Set HKs for Boolean fields\n //frame.nuSetProperty(\'filter_adr_active\', nuGetValue(\'adr_active\') ? \'1\' : \'\');\n\n frame.nuGetBreadcrumb();\n\n}', NULL );
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript, sev_json)
VALUES ( '63ea46e3ef92c6b', '63ea46e3eeff64b', 'onclick', '$(\"[search-field]\").val(\'\'); // empty all search fields\napplySearch();\n', NULL );
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Guidance needed creating multi-criteria search form with subform
Thanks. Could you also tick the "IFrame forms" checkbox in the Cloner so it will export the iframe's data as well?
Re: Guidance needed creating multi-criteria search form with subform
Sorry, I thought I had. Take two (although this doesn't look any different even though the iFrame box is definitely ticked):-
Code: Select all
-- nuBuilder cloner SQL Dump
-- Version 1.21
-- Generation Time: February 13, 2023 01:19:15 PM
-- Form Description: Property Search
-- Form Code: frm_propsearch
-- Form Table:
-- Form Type: launch
--
-- zzzzsys_form: frm_propsearch_clone_1
--
INSERT INTO zzzzsys_form (zzzzsys_form_id, sfo_type, sfo_code, sfo_description, sfo_breadcrumb_title, sfo_table, sfo_primary_key, sfo_browse_redirect_form_id, sfo_browse_row_height, sfo_browse_rows_per_page, sfo_browse_title_multiline, sfo_browse_autoresize_columns, sfo_browse_sql, sfo_javascript, sfo_browse_javascript, sfo_edit_javascript, sfo_style, sfo_mobile_view, sfo_json)
VALUES ( '63ea46e3ee30639', 'launch', 'frm_propsearch_clone_1', 'Property Search', NULL, '', '', '', '0', '0', '0', NULL, '', NULL, NULL, NULL, NULL, NULL, NULL );
--
-- zzzzsys_tab
--
INSERT INTO zzzzsys_tab (zzzzsys_tab_id, syt_zzzzsys_form_id, syt_title, syt_order, syt_help, syt_access, syt_json)
VALUES ( '63ea46e3ee6bb6a', '63ea46e3ee30639', 'Main', '10', NULL, NULL, NULL );
--
-- zzzzsys_object
--
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eede39f', '63ea46e3ee30639', 'Launch Form 1', 'input', 'prop_name_srch', 'Property Name', '63ea46e3ee6bb6a', '40', '12', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eee1cb4', '63ea46e3ee30639', 'Launch Form 1', 'input', 'unit_no_srch', 'Unit No', '63ea46e3ee6bb6a', '50', '44', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eee538c', '63ea46e3ee30639', 'Launch Form 1', 'input', 'unit_name_srch', 'Unit Name', '63ea46e3ee6bb6a', '60', '76', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eee8102', '63ea46e3ee30639', 'Launch Form 1', 'input', 'house_no_srch', 'House No', '63ea46e3ee6bb6a', '70', '108', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eeeae3e', '63ea46e3ee30639', 'Launch Form 1', 'input', 'road_name_srch', 'Road Name', '63ea46e3ee6bb6a', '80', '140', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eef73ab', '63ea46e3ee30639', 'Launch Form 1', 'input', 'postcode_srch', 'Postcode', '63ea46e3ee6bb6a', '90', '172', '127', '200', '22', '1', 'left', '0', '0', '0', NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, 'search-field', '0', '', '', '', '', '', '', '', NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eefa45a', '63ea46e3ee30639', '', 'run', 'iframe_proplist', 'Property List', '63ea46e3ee6bb6a', '30', '14', '344', '1000', '500', '1', 'left', '0', '0', '0', NULL, NULL, NULL, NULL, '63e6143c4903290', NULL, 'i', '', 'F', NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, '', NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eefcd21', '63ea46e3ee30639', '', 'input', 'btn_searchprops', 'Search', '63ea46e3ee6bb6a', '20', '211', '128', '80', '22', '1', 'left', '0', '0', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, 'button', NULL, NULL, NULL, '', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json)
VALUES ( '63ea46e3eeff64b', '63ea46e3ee30639', '', 'input', 'btn_resetsearch', 'Reset', '63ea46e3ee6bb6a', '10', '211', '224', '100', '22', '1', 'left', '0', '0', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL, 'button', NULL, NULL, NULL, NULL, '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
--
-- zzzzsys_event
--
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript, sev_json)
VALUES ( '63ea46e3ef8fedf', '63ea46e3eefcd21', 'onclick', '// Add an event listener for all filter fields and if the user pressed the \"Search\" key, apply the search\n$(\"[search-field]\").each(function() {\n\n $(this).btn_searchprops(function(e) {\n applySearch();\n });\n\n});\n\nfunction applySearch() {\n\n var frame = $(\"#iframe_proplist\")[0].contentWindow; // <--- Replace your_iframe_object_id with your iframe object id\n\n // Set Hash Cookies (HK) for all filter fields:\n\n // Example: Set HKs for Text fields\n frame.nuSetProperty(\'prop_name_fltr\', prop_name_srch.value);\n frame.nuSetProperty(\'unit_no_fltr\', unit_no_srch.value);\n frame.nuSetProperty(\'unit_name_fltr\', unit_name_srch.value);\n frame.nuSetProperty(\'house_no_fltr\', house_no_srch.value);\n frame.nuSetProperty(\'road_name_fltr\', road_name-srch.value);\n frame.nuSetProperty(\'postcode_fltr\', postcode_srch.value);\n\n // Set HKs for Boolean fields\n //frame.nuSetProperty(\'filter_adr_active\', nuGetValue(\'adr_active\') ? \'1\' : \'\');\n\n frame.nuGetBreadcrumb();\n\n}', NULL );
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript, sev_json)
VALUES ( '63ea46e3ef92c6b', '63ea46e3eeff64b', 'onclick', '$(\"[search-field]\").val(\'\'); // empty all search fields\napplySearch();\n', NULL );
Re: Guidance needed creating multi-criteria search form with subform
Here's the iFrame form on its own.
Code: Select all
-- nuBuilder cloner SQL Dump
-- Version 1.21
-- Generation Time: February 13, 2023 01:51:08 PM
-- Form Description: Property List
-- Form Code: frm_propertylist
-- Form Table: tblProperties
-- Form Type: browse
--
-- zzzzsys_form: frm_propertylist_clone_1
--
INSERT INTO zzzzsys_form (zzzzsys_form_id, sfo_type, sfo_code, sfo_description, sfo_breadcrumb_title, sfo_table, sfo_primary_key, sfo_browse_redirect_form_id, sfo_browse_row_height, sfo_browse_rows_per_page, sfo_browse_title_multiline, sfo_browse_autoresize_columns, sfo_browse_sql, sfo_javascript, sfo_browse_javascript, sfo_edit_javascript, sfo_style, sfo_mobile_view, sfo_json)
VALUES ( '63ea4e5ce136cda', 'browse', 'frm_propertylist_clone_1', 'Property List', NULL, 'tblProperties', 'idProperties', '', '0', '0', '1', NULL, 'SELECT * FROM #TABLE_ID#\n', NULL, NULL, NULL, NULL, NULL, NULL );
--
-- zzzzsys_tab
--
INSERT INTO zzzzsys_tab (zzzzsys_tab_id, syt_zzzzsys_form_id, syt_title, syt_order, syt_help, syt_access, syt_json)
VALUES ( '63ea4e5ce186d8d', '63ea4e5ce136cda', 'Main', '10', NULL, NULL, NULL );
--
-- zzzzsys_select
--
INSERT INTO zzzzsys_select (zzzzsys_select_id, sse_code, sse_description, sse_json, sse_sql, sse_edit, sse_system)
VALUES ( '63ea4e5ce136cda_BR', NULL, NULL, '{\"tables\":[{\"id\":\"boxc16760237861661001\",\"position\":{\"top\":25,\"left\":22},\"tablename\":\"tblProperties\",\"alias\":\"\",\"checkall\":true,\"checkboxes\":[false,false,false,false,false,false]},{\"id\":\"boxc16760237893181002\",\"position\":{\"top\":24,\"left\":247},\"tablename\":\"tblRoads\",\"alias\":\"\",\"checkall\":true,\"checkboxes\":[false,false,false,false,false,false]}],\"joins\":{\"field_0_boxc16760237893181002--field_5_boxc16760237861661001\":\"LEFT\"}}', 'SELECT\n tblProperties.*,\n tblRoads.*\n\nFROM\n tblProperties\n LEFT JOIN tblRoads ON tblRoads.idRoads = tblProperties.id_Roads\n', NULL, '1' );
--
-- zzzzsys_browse
--
INSERT INTO zzzzsys_browse (zzzzsys_browse_id, sbr_zzzzsys_form_id, sbr_title, sbr_display, sbr_align, sbr_format, sbr_order, sbr_width, sbr_json)
VALUES ( '63ea4e5ce1d31d7', '63ea4e5ce136cda', 'Building Name', 'BuildingName', 'l', '', '10', '200', NULL );
INSERT INTO zzzzsys_browse (zzzzsys_browse_id, sbr_zzzzsys_form_id, sbr_title, sbr_display, sbr_align, sbr_format, sbr_order, sbr_width, sbr_json)
VALUES ( '63ea4e5ce1d4f91', '63ea4e5ce136cda', 'House No', 'HouseNo', 'l', '', '40', '60', NULL );
INSERT INTO zzzzsys_browse (zzzzsys_browse_id, sbr_zzzzsys_form_id, sbr_title, sbr_display, sbr_align, sbr_format, sbr_order, sbr_width, sbr_json)
VALUES ( '63ea4e5ce1d6784', '63ea4e5ce136cda', 'Unit Name', 'UnitName', 'l', '', '30', '150', NULL );
INSERT INTO zzzzsys_browse (zzzzsys_browse_id, sbr_zzzzsys_form_id, sbr_title, sbr_display, sbr_align, sbr_format, sbr_order, sbr_width, sbr_json)
VALUES ( '63ea4e5ce1d7c62', '63ea4e5ce136cda', 'Unit No', 'UnitNo', 'l', '', '20', '60', NULL );
INSERT INTO zzzzsys_browse (zzzzsys_browse_id, sbr_zzzzsys_form_id, sbr_title, sbr_display, sbr_align, sbr_format, sbr_order, sbr_width, sbr_json)
VALUES ( '63ea4e5ce1d8c6b', '63ea4e5ce136cda', 'Road', 'RoadName', 'l', NULL, '50', '200', NULL );
INSERT INTO zzzzsys_browse (zzzzsys_browse_id, sbr_zzzzsys_form_id, sbr_title, sbr_display, sbr_align, sbr_format, sbr_order, sbr_width, sbr_json)
VALUES ( '63ea4e5ce1da097', '63ea4e5ce136cda', 'Parish', 'Parish', 'l', NULL, '60', '70', NULL );
INSERT INTO zzzzsys_browse (zzzzsys_browse_id, sbr_zzzzsys_form_id, sbr_title, sbr_display, sbr_align, sbr_format, sbr_order, sbr_width, sbr_json)
VALUES ( '63ea4e5ce1e28f7', '63ea4e5ce136cda', 'Postcode', 'Postcode', 'l', NULL, '70', '50', NULL );
--
-- zzzzsys_php
--
INSERT INTO zzzzsys_php (zzzzsys_php_id, sph_code, sph_description, sph_group, sph_php, sph_run, sph_zzzzsys_form_id, sph_system, sph_global, sph_hide, sph_json)
VALUES ( '63ea4e5ce136cda_BB', '63ea4e5ce136cda_BB', 'System PHP', 'nubuilder', '$filter = \' AND (1 = 1) \';\n\nsetFilter($filter, \'prop_name_fltr\', \'BuildingName\');\nsetFilter($filter, \'unit_no_fltr\', \'UnitNo\');\nsetFilter($filter, \'unit_name_fltr\', \'UnitName\');\nsetFilter($filter, \'house_no_fltr\', \'HouseNo\');\nsetFilter($filter, \'road_name_fltr\', \'RoadName\');\nsetFilter($filter, \'postcode_fltr\', \'Postcode\');\n\nfunction setFilter(&$filter, $filterName, $columnName) {\n $value = nuGetProperty($filterName);\n if ($value != \'\') $filter .= \" AND $columnName LIKE \'%$value%\' \";\n}\n$create = \"CREATE TABLE #TABLE_ID# \";\n\n$select = \"\n\nSELECT \n\n idProperties,\n BuildingName,\n UnitNo,\n UnitName,\n HouseNo,\n RoadName,\n Parish,\n Postcode\n\nFROM tblProperties LEFT JOIN tblRoads ON tblRoads.idRoads = tblProperties.id_Roads\n\nWHERE (1 = 1)\n\n\" . $filter;\n\n// To output the SQL to nuDebug Results:\nnuDebug($select);\nnuRunQuery($create . $select);\n ', NULL, NULL, '1', '0', NULL, NULL );
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Guidance needed creating multi-criteria search form with subform
This code must be placed in the form's Custom Code, not in the button's onclick event:
Code: Select all
// Add an event listener for all filter fields and if the user pressed the "Search" key, apply the search
$("[search-field]").each(function() {
$(this).btn_searchprops(function(e) {
applySearch();
});
});
function applySearch() {
var frame = $("#iframe_proplist")[0].contentWindow; // <--- Replace your_iframe_object_id with your iframe object id
// Set Hash Cookies (HK) for all filter fields:
// Example: Set HKs for Text fields
frame.nuSetProperty('prop_name_fltr', prop_name_srch.value);
frame.nuSetProperty('unit_no_fltr', unit_no_srch.value);
frame.nuSetProperty('unit_name_fltr', unit_name_srch.value);
frame.nuSetProperty('house_no_fltr', house_no_srch.value);
frame.nuSetProperty('road_name_fltr', road_name-srch.value);
frame.nuSetProperty('postcode_fltr', postcode_srch.value);
// Set HKs for Boolean fields
//frame.nuSetProperty('filter_adr_active', nuGetValue('adr_active') ? '1' : '');
frame.nuGetBreadcrumb();
}
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Guidance needed creating multi-criteria search form with subform
And in the search button, add an onclick event with the code
Code: Select all
applySearch();
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Guidance needed creating multi-criteria search form with subform
Also change this code
Into:
Code: Select all
$("[search-field]").each(function() {
$(this).btn_searchprops(function(e) {
applySearch();
});
});
Code: Select all
$(search-field]").each(function() {
$(this).enterKey(function (e) {
applySearch();
});
});
Re: Guidance needed creating multi-criteria search form with subform
Ok, have moved that across. Presumably it goes in the launch form's custom code rather than the iFrame.
Is there a missing [ from the first line of replacement code and also a closing ) required after the (e) on the second line?
Still no joy yet though

Last edited by Keith-i on Mon Feb 13, 2023 5:08 pm, edited 1 time in total.