locked
Hide DataFormWebpart using JQuery including its Validation RRS feed

  • Question

  • I have three Custom List Forms (NEWFORM) in a single page. How can I hide the other forms using jquery so that only one form will be displayed and when the form is hidden the validation will not be used also.

    1. I already used DataForm1.Show() and/or DataForm1.Hide() but validation of hidden form is still working on hidden forms that is why button is not functioning well.

    2. What I need is the equivalent of Visible Property of DataForm Webpart using JQuery, but this is not possible/available as far as I know.

    3. I cannot just simply use Visible Property of DataForm Webpart because it will require me to add C# scripts, and I can only use JavaScripts.

    I am using MOSS 2007, SPD 2007.

    Thanks.


    cal_bonjovi

    Tuesday, November 12, 2013 1:18 AM

Answers

  • Hi,

    Instead of using DataForm1.Show() and/or DataForm1.Hide() try by setting the attribute "Visible" to "false" using jQuery

    $('#<ControlId').attr("visible", "false");

    OR 

    Create a validation group for all the controls. Using jquery at the time of hiding remove set the validation group property to "" and while showing set the name for the validation property This way you can avoid the validation being triggered.

    Regards,


    Sairam Avacorp Technologies

    Tuesday, November 12, 2013 4:36 AM

All replies