Change default mode of a popup

I have created a page that I would like to use for creating records in a table via a Global Action via a popup.  I would like to use the same  page for viewing details of a table row.  When using the popup for creating I would like the fields to show as editable but not when used for viewing details.

I am new Skuid user so hopefully there is a simple answer.


Probably the simplest way is to copy & paste the XML for your global action “creating” popup into a new row action “viewing” popup, and then change the mode for the field editors in the new one.

You have to maintain two versions of basically the same thing that way…
At least until the next release? (looks hopefully toward the Skuid)

Otherwise, you could change the modes of the field editors with with javascript based on whether the record was new.

Can anyone think of another way?

If there’s a way to pass a parameter to a page include that would somehow change the mode, that would be handy too, but I haven’t seen anything like that done.

Scotty - are you trying to use a single page include for both situations?  That makes lots of sense. 

I would reccomend what Matt says above.  Write an inline JS snippet that changes the mode of the field editor based on whether there is data or not.  Existing data = read/edit mode.  No date = edit. 

I don’t think anything in the upcoming release will make this easier.  Sorry… 

I am looking for this Javascript option. Could you provide a simple example to get us started?