Adding dbjoin element on custom form causes Type Error

Status
Not open for further replies.
What do you mean by custom form, custom form template or something else?

If it's working with standard Fabrik bootstrap form template, but not in your custom template, you just have to go through/disable/eliminate the differences one by one and see what is causing this.
 
I assume you didn't keep the Fabrik structure.

The given code line is doing
var p = this.element.getParent('.fabrikElement');
var f = p.getElement('input[name*=-auto-complete]');
So it seems it doesn't find the CSS class or input type it needs.
 
Thanks for your input juuser.

This is a custom form that I am creating to edit a record in a table. I have already narrowed it down to any dbjoin fields that are set to auto-complete in the Fabrik Elements settings. To debug I turned all dbjoins to drop-down and the error went away. As soon as I set any of my dbjoin elements to auto-complete, I get the error. I tried setting different fields one by one to see if it made any difference and it did not.

Something else I just noticed. Whenever I have ALL the dbjoins set to drop-down, I receive this error:
no fabrikElementContainer class found for textarea 2 utils.js:3:119 . I have two text area fields on the form as well.

Not sure if they are related or not.

Any ideas anyone?
 
troester I believe you are correct. The underlying MySQL tables were changed so to work around this, I added the new fields to Fabrik's element table. So you are saying that each element has its own class assigned by name? Where is the Class for the elements stored? Is it in a table or a file on the system?
 
Okay! It took me a few minutes but with troester and juuser's help I understand what was going on with my code. In my default.php, I needed to add containers around my <?php echo ?> of my data with the appropriate Fabrik classes.

Example.
<div class='controls'>
<div class='fabrikElement'>
<?php echo $contDtl['first_name']; ?>
</div>
</div>

Thanks for your help and I hope this helps somebody else in the future!
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top