List Form - What Form Has Been Opened (New, Edit, Display) - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

List Form - What Form Has Been Opened (New, Edit, Display)

Last post 10-12-2012 09:44 AM by Gennady Vanin (Геннадий Ванин, Новосибирск). 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-12-2012 07:05 AM

    • ehaze
    • Top 500 Contributor
    • Joined on 12-11-2007
    • Posts 49

    List Form - What Form Has Been Opened (New, Edit, Display)

    InfoPath List Forms.
    OOB, is there a way to know what form 'mode' has been opened or changed to.

    What I'm trying to accomplish:

    If mode = Edit
    Hide field_A


    If mode = Display
    Hide field_B

  • 10-12-2012 07:44 AM In reply to

    Re: List Form - What Form Has Been Opened (New, Edit, Display)

     I do not believe you can do it from Infopath.

    The same (one and the only)  template is used for all modes.
    In which mode it is opened is a matter of external to Infopath usage (or generated on the basis of an Infopath  template, with the use of some differing parameters or attributes,  forms or Infopath Form Web Part ASPX pages). 

    So, what you asked has sense to do it only from aspx sharepoint Webpart ASPX page but "ControlMode property is a property of Form Field in ASP Custom New/Edit/Display Form Web Part, but not a property of InfoPath Form Web Part". Check my question and replies to this related to your question:

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 10-12-2012 07:51 AM In reply to

    • ehaze
    • Top 500 Contributor
    • Joined on 12-11-2007
    • Posts 49

    Re: List Form - What Form Has Been Opened (New, Edit, Display)

    Found my answer.

    http://blogs.msdn.com/b/infopath/archive/2010/04/15/using-multiple-views-in-customized-list-forms.aspx

    Didn't know you could specify a Default Item view.

    Gennardy, thank you for the reply!
  • 10-12-2012 09:44 AM In reply to

    Re: List Form - What Form Has Been Opened (New, Edit, Display)

     Thanks for your feedback.

    You are quite a quick silver, sorry, quick solver.
    Might be I replied too fast also.

    So, it is obviously possible to have differing default views for different Infopath Form Web Part ASPX pages

    • EditIFS.aspx (Edit dialog page)
    • DisplayIFS.aspx (Display dialog page)
    • NewIFS.aspx (New dialog Infopath form page)

    generated from  the same Infopath template, externally, from Infopath form  ASPX page.

    And it is quite easy to do for a webpage with a single mode/dialog.

    Why would these dialog modes have different webpages, if it was not possible.

    Just to make clear what I referred in my previous post was the problem of having multiple Infopath parts from the same template in different/multiple modes in one ASPX web part page.
    And the problem is that Infopath form web part is always locked (unchangeable) in by default edit mode only. With exception of Infopath web parts that are auto-generated by generating EditIFS.aspx, DisplayIFS.aspx,  NewIFS.aspx which Controlmodes are also unavailable for tweaking.

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.