0

I'm trying to do a custom form and I using jquery to do some functionalities. How could I know when the form finish rendering the fields? I'm trying to use document ready from jquery but this funtion triggers before the form finish rendering all the fields.

Is there another function i could use?

3
  • 1
    For 2013 look in to using JSLink and its PostRender event, like shown here: idubbs.com/blog/2014/js-link-highlighting-a-row-with-csr with a bit of luck you do not need a custom form at all, just add a JSLink file to it May 6, 2015 at 15:44
  • I don't want to use a JSLink... I'm creating a form with SharePoint:FormField properties
    – yngrdyn
    May 6, 2015 at 15:50
  • I'm not talking about CSR
    – yngrdyn
    May 6, 2015 at 15:50

2 Answers 2

1

You can also add a js file using content editor web part and add the below code in it:

ExecuteOrDelayUntilScriptLoaded(init,'sp.js');

function init(){
 // perform functionalities here
}
1
  • This might works but i'm not working with normal forms... I'm working with custom forms associated to content types
    – yngrdyn
    May 8, 2015 at 14:12
0

Well, this was a little of simple jquery... I had to use

  $(window)load() 

instead of

$(document).ready()
5
  • 1
    Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question.
    – Waqas Sarwar MVP
    May 6, 2015 at 16:42
  • It sure looks like an answer too me! A short one, but still :) May 6, 2015 at 18:00
  • Well @Waqas it wasn't a comment on the question it was just the answer to it
    – yngrdyn
    May 6, 2015 at 18:13
  • please mark this as answer, it is very short answer that's why i flag it.
    – Waqas Sarwar MVP
    May 6, 2015 at 18:15
  • I cannot mark it as an answer until 2 days...
    – yngrdyn
    May 6, 2015 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.