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

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.

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 :slight_smile: control will be better

cheers dude, God bless you

[QUOTE=MikeDE;31635]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?
[/QUOTE]

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

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 :smiley: 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 :slight_smile:

Gee, maybe NetMake will fix that in the next update :slight_smile:

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 :smiley:

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 :smiley:

Cheers

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


var frm = document.forms['F1'];
for(var i=0;i<frm.length;i++)
{
   frm.elements[i].disabled = true;
}

Eh?

jsb

I like the “Eh” loooooool all goes possible when jsb is around :cool:

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

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:


var frm = document.forms['F1'];
for(var i=0; i<frm.length; i++){
    frm.elements[i].disabled = true;
}
[B]var edit_buttons = document.querySelectorAll('[id^=fldedt_]');
for (var i=0; i < edit_buttons.length; i++) {
    edit_buttons[i].style.display = "none";
}[/B]

you can remove Update button from the toolbar , still the fields are editable
your question brings met to earlier feature request - easy convert forms into (slide) grids. It should not be that hard as form fields/blocks can be mapped into the grid fields with extra default settings.
I really encourage SC team to look at MS Access architecture, where you can create several views for the same form. It is much more datacentric and you can manage metadata for your fields like select types at one place and only once. Well at least, SC should make possible to copy settings of the fields from one form to another form or grid. Please vote!

a work around now i use css

in the onload event put this code

echo ‘<style type=“text/css”>
input, select, button, img {
pointer-events: none;
}
</style>’;

nice thing about it you can use some conditional logic before.
if user loging empty then echo…

(it does not replace security but just for public forms or someting)