Change default mode of a popup

edited February 10, 2017 in Questions
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.

Thanks

Comments

  • Matt SonesMatt Sones 💎💎💎
    edited February 10, 2017
    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.

  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    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.... 
  • edited June 1, 2016
    I am looking for this Javascript option. Could you provide a simple example to get us started?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!