Forum Discussion

ArG's avatar
ArG
Ideator I
6 years ago
Solved

Show form on promote

Hi,

Usecase is as follows

need to validate field on promote if case of failure need to popup form(existing) and capture user input.

for validation, i tried with pre server method on lifecycle but popping up form not possible from server method. 

Is there a way to achieve this?

Any suggestion/work around would really help

Thanks

  • Hi ArG,

    I see, I think this community blog post is what you're looking for then [emoticon:1435ff2429184e17bc948e4f19178e1e]. It explains how to create a custom modal dialog asking the user for text input as a client method. 

    Best,
    Nithin

8 Replies

  • Hi ArG,

    You wouldn't have access to the form through a lifecycle since a server side method (required) would not be able to communicate with the client (which can call a popup action). You also would not be able to use a client method, as a replacement, since the pre method requires a server method.

    However, a workaround solution to this could be using the newError() method that returns a popup containing a string you can specify. This way if the user misses a field for a example, you can display this popup and require the field be completed in order for anything to be applied to the server.

    Best,

    Nithin

    • ArG's avatar
      ArG
      Ideator I

      Hi Nithin,

      Thanks for reply.

      I understand that  client can't be called from server. but usecase is to show modal dialog to capture user comment. It is not popup actually. correction in question [emoticon:c4563cd7d5574777a71c318021cbbcc8]

      I am trying to modify javascript code present for on click of promote button, so that i can show required form based on my validation. Any idea on this ?

      Thanks

      • Nithin_Mahesh's avatar
        Nithin_Mahesh
        Ideator I

        Hi ArG,

        I see, I think this community blog post is what you're looking for then [emoticon:1435ff2429184e17bc948e4f19178e1e]. It explains how to create a custom modal dialog asking the user for text input as a client method. 

        Best,
        Nithin