XModPro

FormX inline editing - hiding elements on button click

Steve Krantzman Steve Krantzman asked Dec 11, 2018
Active Dec 12 · Viewed 2391 times
<p>I have set up a FormX control for inline editing of records. The form works as expected except for one small issue. </p> <p>When you click on an inline edit button, the edit form appears over the existing list of records.The issue is that if you click on a second edit button in the list, without first submitting a change to the record, or canceling out of the edit, a second edit form appears over the list, and on and on. </p> <p>I thought no big deal, I will just add some jQuery to the OnClientClick property of the edit button to hide the siblings of the button being clicked. I just can't get this to work. I can however, get a jQuery Alert to pop up when the button is clicked. </p> <p>Thinking my jQuery was a little rusty, I set up a simple xmod temple with a FormX control in it to test my code (see code fiddle below). </p> <p>While my code to toggle the elements css class works, the code to hide the element does not. I believe the code to be correct, so either certain jQuery functions do not work within FormX controls, I am doing something wrong, or I am going about this the wrong way. </p> <p><a href="http://dnndev.com/fiddle/fid/731">http://dnndev.com/fiddle/fid/731</a><br> </p>

1 Answer

Loading answers...