Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Performing searches without using standard search form

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
icoso
Posts: 181
Joined: Sun Feb 07, 2021 11:09 pm
Been thanked: 1 time

Performing searches without using standard search form

Unread post by icoso »

Is there a way to perform a search, like the standard search form runs, on a browse/edit form?

Can I create my own search form? Where a user inputs data on a field and then I run an SQL statement using that data to perform a search and then return a list of the retrieved records? then when the user clicks on a record it opens my browse/edit form?

Im trying to figure out how to bypass the current search form and use some other launch form or something to be able to encrypt / modify what the user inputs into the search field then perform the actual search after modifying the search criteria.

For example, I have records in the data table that contain an SSN, I want to store that SSN encrypted. BUT I need to search the table using that encrypted SSN. So the user goes to the search enters 123-45-6789 then my Javascript or PHP takes that original data, encrypts it, THEN performs the search using that encrypted SSN to find the records. Then upon the system retrieving that data, I need to be able to un-encrypt the SSN when the list of records is displayed to the user.

ANyone???? I would have thought that the existing search form that comes up when you open a browse/edit form, would have that ability to do so, but it apparently does not. SO I have to build my own.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Performing searches without using standard search form

Unread post by kev1n »

You can embed and use any other (JS) controls like https://datatables.net/
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: Performing searches without using standard search form

Unread post by apmuthu »

Any reversible encryption is best not done in the client side as the JS code will give it up for interception.
Decrypted display will need to pass as either plain decrypted text or client side manipulated display.
Special libraries / tools exists for encryption / decryption in the OS level that can be leveraged with system() and exec() constructs too but these are not available securely on the client side, maybe with obfuscation and minification.
The search string can remain insecure and the server side can do all the manipulation before actual search but the output can be displayed without the search string in the output.
icoso
Posts: 181
Joined: Sun Feb 07, 2021 11:09 pm
Been thanked: 1 time

Re: Performing searches without using standard search form

Unread post by icoso »

IF you actually have read my posts, you'd know that Im not doing any encrypting/decrypting on client side, but rather via PHP (server side). Obviously the search form performs in such a way that server side execution is done and the resulting data set is returned as well as updating to the client side.
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: Performing searches without using standard search form

Unread post by apmuthu »

Then everything that comes into the browser is fully decrypted or is there any client side final manipulation?
icoso
Posts: 181
Joined: Sun Feb 07, 2021 11:09 pm
Been thanked: 1 time

Re: Performing searches without using standard search form

Unread post by icoso »

Right, all scripting for encrypting/decrypting is done via PHP. What gets returned to the client side would be the unencrypted data from the web server. Nothing is being encrypted/decrypted in javascript. Also The website is accessed via https:// so that means communications between the user(client) browser and the server is transmitted via SSL transport, right?
Post Reply