How to put a button on a form to do something.
Posted: Wed Feb 10, 2021 11:23 pm
I have tried... I have read the OLD and NEW user guides. I have searched the forums (add button, add a button, nfunctions, functions, call a form, etc.) and read numerous posts. I have read the wikis. I still cant find how to add a button on a form to open another form. It's just not intuitive. I've found a lot of simple things (that I think should be simple are not simple, nor intuitive with this DB system and I've ONLY been at this for 3 days. I just found this system 3 days ago. I've written numerous database systems, applications, web apps, web sites, etc. and honestly not sure why simple things that can normally be easily accomplished and logical are not with this DB system. Like adding Masks to field formats, or using "lookup tables" (called selects here) for field validation, etc.. (Maybe its just me...) But I digress... After spending hours trying to figure out something and how it works I can accomplish quite a lot and even after just 3 days can see the potential for a DB system like nuBuilder for some of my clients. Its just getting there has so far been excrutiatingly slow for the simplest of tasks.
How do I add a button on an existing form to open another existing form for editing the current record that Im looking in view mode?
I created a Browse and Edit form using the Fast Forms designer. It created the table, and I modified it and adjusted it to my liking. I then did some reading... and more reading... and more... because my though on this was, I do not want some users to be able to EDIT the fields on this table once they have been saved int he database. So I found out how to duplicate (clone) a form by searching and reading the forums and piecing together an answer. I created a "Browse" clone of my edit form. Except it still allowed me to edit the fields. So then I changed the form so that ALL the fields were ReadOnly and now I want to add a BUTTON on that form so that if the user clicks it, the form opens into edit mode and all the fields magically open for editing. I figured the easiest way to do this would be to open the current record into another Form (or the original form that I cloned) that allowed the user to edit the record info. After spending a couple of hours searching and reading I came across a post that kind of discussed adding a Next button to a form and how to do that. It said to add the following (I've changed it slightly to fit my needs) to the Javascript of the form.
However according to the wiki the 2nd param of the nuform function should have the "record id of the Edit Form or an empty string to display a Browse Form." I can't find this record id in any of the screens for the FF1 form. Where do I find this record ID? Regardless, adding this Javascript DOES NOT add an Action Button to the form screen. It doesn't do anything but sit and laugh at me to try, try again.... (again excruciatingly slow...) for something that I could so easily in Access or using PHP on my self made forms, or in VB, or in C++, or just about anything else...
These are simple things that takes HOURS to figure out and I'm not sure why... If ANYONE can point me in the right direction on How to Add a Button to a form that does something... like open another form to edit the information that is on the current form, that would be FANTASTIC! I haven't even gotten to the part where I want to perform a "lookup" (I guess thats what its called here) to another relational table (one to many) to show all the records for the main Customer from the ExistingOrders table that then I can click on that record ID and open a Browse Only frm of that record.) That's next. Additionally, I need to be able to while "Viewing" a record, be able to click a button that would "Duplicate the record into a new form (except a few of the fields or change a few like a orderdate field.)
I have so much to learn... Thank you for your guidance...
How do I add a button on an existing form to open another existing form for editing the current record that Im looking in view mode?
I created a Browse and Edit form using the Fast Forms designer. It created the table, and I modified it and adjusted it to my liking. I then did some reading... and more reading... and more... because my though on this was, I do not want some users to be able to EDIT the fields on this table once they have been saved int he database. So I found out how to duplicate (clone) a form by searching and reading the forums and piecing together an answer. I created a "Browse" clone of my edit form. Except it still allowed me to edit the fields. So then I changed the form so that ALL the fields were ReadOnly and now I want to add a BUTTON on that form so that if the user clicks it, the form opens into edit mode and all the fields magically open for editing. I figured the easiest way to do this would be to open the current record into another Form (or the original form that I cloned) that allowed the user to edit the record info. After spending a couple of hours searching and reading I came across a post that kind of discussed adding a Next button to a form and how to do that. It said to add the following (I've changed it slightly to fit my needs) to the Javascript of the form.
Code: Select all
nuAddActionButton('EditTaxForm', 'Edit TaxForm', 'nuForm('FF1', '', '', '', '2')');
These are simple things that takes HOURS to figure out and I'm not sure why... If ANYONE can point me in the right direction on How to Add a Button to a form that does something... like open another form to edit the information that is on the current form, that would be FANTASTIC! I haven't even gotten to the part where I want to perform a "lookup" (I guess thats what its called here) to another relational table (one to many) to show all the records for the main Customer from the ExistingOrders table that then I can click on that record ID and open a Browse Only frm of that record.) That's next. Additionally, I need to be able to while "Viewing" a record, be able to click a button that would "Duplicate the record into a new form (except a few of the fields or change a few like a orderdate field.)
I have so much to learn... Thank you for your guidance...