• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Javascript with customized form default.php don't work

imagenweb

New Member
Hello everybody. I have an application that needs a customized form, I made tables and take the elements from the form in local variables to get order to the form (just like the tutorial said), but when I want to use the javascript it doesn?t work. I'd tried to customize the javascript code but still fail. I need help ?Does someone have an idea what can I do?
 
You must keep the "Fabrik structure" of the elements (HTML ids, CSS classes, surrounding DIVs with ids and classes etc)
 
You must keep the "Fabrik structure" of the elements (HTML ids, CSS classes, surrounding DIVs with ids and classes etc)
I think that this is my problem I made this:

$date_time = $elements['date_time']->element;
$id = $elements['id']->element;
$idacademico = $elements['idacademico']->element;
$num_doc_actividad = $elements['num_doc_actividad']->element;
$descripcion_ac = $elements['descripcion_ac']->element;

<table width="900" border="1">
<tr>
<td colspan="10" class="Contenido Celda">Si realiz? otras actividades institucionales describa cu?les y su forma de participaci?n.</td>
</tr>
<tr>
<td width="44" class="Contenido">&nbsp;</td>
<td width="840" colspan="9" class="Contenido"><?php echo $descripcion_ac; ?></td>
<td class="Contenido" style="display:none;" >ID Acad?mico: <?php echo $idacademico; ?><?php echo $id; ?></td>
</tr>
</table>

But i can't understand how can i assign a class or an id to the elements
 
This scenario is simple and can build only in Fabrik with the appropriate group settings.
Try in your form group->tab repeat->template: table then in tab layout enter your columns and columns widths.
 
This scenario is simple and can build only in Fabrik with the appropriate group settings.
Try in your form group->tab repeat->template: table then in tab layout enter your columns and columns widths.
In this example its so easy because I only use one element, but i have to make a lot of forms and someones has 30 elements in specific structure
 
Organize your form elements in groups then create your custom form template and organize these groups on your design.
I use standard code from default template to show each group where I want.
PHP:
    <div class="col-medium span4">
        <?php
            $group = $this->groups['YOUR-GROUP-NAME'];
            $this->group = $group;
        ?>
        <fieldset class="<?php echo $group->class; ?>" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">
            <?php
            if ($group->showLegend) :?>
                <legend class="legend"><?php echo $group->title;?><span class="icon-menu-2" style="font-size:24px;"> </span></legend>
            <?php
            endif;
            if (!empty($group->intro)) : ?>
                <div class="groupintro"><?php echo $group->intro ?></div>
            <?php
            endif;
            ?>
            <div class="block-elements">
            <?php
            $this->elements = $group->elements;
            echo $this->loadTemplate($group->tmpl);
            ?>
            </div>
            <?php
            if (!empty($group->outro)) : ?>
                <div class="groupoutro"><?php echo $group->outro ?></div>
            <?php endif; ?>
        </fieldset>
    </div>
?hus preserving the Fabrik structure.
I don't know is this best and right way, but work for me.
 
Last edited:
Organize your form elements in groups then create your custom form template and organize these groups on your design.
I use standard code from default template to show each group where I want.
PHP:
    <div class="col-medium span4">
        <?php
            $group = $this->groups['YOUR-GROUP-NAME'];
            $this->group = $group;
        ?>
        <fieldset class="<?php echo $group->class; ?>" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">
            <?php
            if ($group->showLegend) :?>
                <legend class="legend"><?php echo $group->title;?><span class="icon-menu-2" style="font-size:24px;"> </span></legend>
            <?php
            endif;
            if (!empty($group->intro)) : ?>
                <div class="groupintro"><?php echo $group->intro ?></div>
            <?php
            endif;
            ?>
            <div class="block-elements">
            <?php
            $this->elements = $group->elements;
            echo $this->loadTemplate($group->tmpl);
            ?>
            </div>
            <?php
            if (!empty($group->outro)) : ?>
                <div class="groupoutro"><?php echo $group->outro ?></div>
            <?php endif; ?>
        </fieldset>
    </div>
?hus preserving the Fabrik structure.
I don't know is this best and right way, but work for me.

Thank you very much, It works. :D
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top