aparna module template - jquery text insert

blindmime
@blindmime
11 years ago
772 posts
I can't tell exactly which Aparna-created module template produces the page with the form.

Also, I'd like to insert some headings at various points throughout the form, using jquery. I'm still a novice with jquery, having only done a few things with it. I'm guessing I could probably use the .before insert function -- correct?
updated by @blindmime: 03/29/14 12:05:27AM
brian
@brian
11 years ago
10,149 posts
Forms are all rendered from elements that are put there by the module or the form designer - if you need to do something custom with them, you will need to use jrCore_page_custom() in your module view function and write the HTML yourself.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
blindmime
@blindmime
11 years ago
772 posts
Would you mind explaining this a little further, or point me to docs? Would it be possible to use jrCore_page_custom and write the HTML page for the form, laying it out exactly how I want using the variables I've created via the form designer?

Customer is being really nit-picky about how the form looks, of course.
brian
@brian
11 years ago
10,149 posts
You're not going to want to use the form designer for this, since the form designer is only going to work with the form field types that are supported.

In your module's index.php file, you would do something like:

view_yourModule_example($_post, $_user, $_conf)
{
    jrCore_page_banner('create something new');

    // Form init
    $_tmp = array(
        'submit_value' => 'create',
        'cancel'       => jrCore_is_profile_referrer()
    );
    jrCore_form_create($_tmp);

    $html = 'your custom jQuery and HTML here';
    jrCore_page_custom($html);

    jrCore_page_display();
}

So that would be called at:

yourmodule/example

and will display the HTML put into $html.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags