Announcement

Collapse
No announcement yet.

show 'big' form as read only + when saving how to redirect properly?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • show 'big' form as read only + when saving how to redirect properly?

    hi guys

    i wounder if someone wants to show a from full of fields (100+) i just want to show the form as read only to review the data in the form... i know i can make field by field as read-only using macros... but imagine more than 100 fields and i want to create this specific application to show the form data as read only.. is there any other way to show the data neat and nice without having too much code and read only macros?


    another thing... i managed to make the form after insert gives message like "Record added" and there is a little button says "Ok" there... what if i want to to customize that and ask the user where wants to go after the insert? any idea?

    in another words, imagine saving simple form.. i want to have a message/page object... whatever, with a message says: record added, click here to add new record, click here to go to grid application, click here to to searh (each one will link it to different application"

    what will be the best scenario to have this?.. i could only find like after insert, add new record or sc_redir which doesn't give the result i'm searching

    any hint or idea is appreciated

  • #2

    i wounder if someone wants to show a from full of fields (100+) i just want to show the form as read only to review the data in the form... i know i can make field by field as read-only using macros... but imagine more than 100 fields and i want to create this specific application to show the form data as read only.. is there any other way to show the data neat and nice without having too much code and read only macros?
    Without coding, no, but you can consider to build the html in a onload and display that in a single label field.

    in another words, imagine saving simple form.. i want to have a message/page object... whatever, with a message says: record added, click here to add new record, click here to go to grid application, click here to to searh (each one will link it to different application"
    create a control and call that (sc_redir) in the onafterinsert event.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Good idea to display all as html, is there an easy way or i have to go through all the fields one by one!?

      Moreover I really wounder why SC guys don't invent something similar, many times it is required to display all fields of the form other than grid view... macro can do if fields are little, but for big forms it is just time wasting and crowded code... hmmmm, something like open the form in view only mode! hehehe

      for the control actually i did it as blank application and it was ugly control will be better

      cheers dude, God bless you

      Comment


      • #4
        Originally posted by MikeDE View Post
        hi guys
        i wounder if someone wants to show a from full of fields (100+) i just want to show the form as read only to review the data in the form... i know i can make field by field as read-only using macros... but imagine more than 100 fields and i want to create this specific application to show the form data as read only.. is there any other way to show the data neat and nice without having too much code and read only macros?
        Since you want to create a specific application to show the form as read only,

        edit the form and click on "Edit Fields" in the left menu. Check the Read-Only checkbox for each field. Better than changing at runtime.

        Dave
        Dave Prue
        Code Whisperer
        Lahar International Corp
        www.lahar.net

        Comment


        • #5
          Hi Dave,

          Yes I tried that, useless, imagine unless you do the macro sc_ readonly thing it, will never work, even if you put as read-only from "edit fields" they are still editable

          laugh more? ok even if you select the fields as "label" sometimes still are editable not all fields types though

          only hat macro works, i usually add it onScriptInit or in ajax stuff, also the field settings "disabled" work ok

          Thanks for your care dude, I guess Albert has an idea about the onload thing didn't entirely get it yet trying and testing

          Comment


          • #6
            Gee, maybe NetMake will fix that in the next update
            Dave Prue
            Code Whisperer
            Lahar International Corp
            www.lahar.net

            Comment


            • #7
              I remember someone complained about this issue about tens of months earlier grrrrrrrrr but macro for this works somehow, so there is a solution at least

              Let them fix the other stuff now looool

              To be honest, i am optimistic after their latest update, they obviously focused on bugs, and Marcia promised about major version update is coming soon

              Hopefully before we die


              Cheers

              Comment


              • #8
                For some reason (who wonders) the readOnly property can't be accessed in the normal way in SC,
                so you might give it a shot with disabling the fields. May be it does help.

                Go to the JS section of your form -> Select Form and then onLoad
                Use the following code
                Code:
                var frm = document.forms['F1'];
                for(var i=0;i<frm.length;i++)
                {
                   frm.elements[i].disabled = true;
                }
                Eh?

                jsb
                Last edited by jsbinca; 01-26-2015, 02:08 PM.

                Comment


                • #9
                  I like the "Eh" loooooool all goes possible when jsb is around

                  Still think your super java targeted powers should not be wasted with time dude, a statue with "jsb" and java cup engraved on it in Halifax center would be so little for your respected person, truly, no compliment.

                  Cheers

                  Comment


                  • #10
                    Thanks jsb!

                    If it must be readonly, it's also nice to hide the edit buttons next to select fields (created by SC if you set a link in the lookup settings of a select field) if you have them in your form:

                    Code:
                    var frm = document.forms['F1'];
                    for(var i=0; i<frm.length; i++){
                        frm.elements[i].disabled = true;
                    }
                    var edit_buttons = document.querySelectorAll('[id^=fldedt_]');
                    for (var i=0; i < edit_buttons.length; i++) {
                        edit_buttons[i].style.display = "none";
                    }
                    Last edited by robydago; 02-13-2015, 05:58 PM.

                    Comment

                    Working...
                    X