Default value for databasejoin are not beeing set

nettemor

Member
I have a databasejoin showing a list of different status like 10, 20, 30, 40, 50 and up to 100 (corresponds to ordered, cancelled, packinglist and so on)

Databasejoin is rendered as a dropdown. When it's filled (in a new registration) the status are automaticly set to 40. And i cant have this so i have tried to set default status to 10 but default are not set. It always shows 40.

I've set the Eval default to No
Default value: 10

or
Eval to Yes
Default value: Return 10;

Nothing is working.

If i do a where statement like "where statusnr=10" i will get only this status and then its working. But in my form i have evaluations that will change this status. And if any of these elements that changes the status are clicked, it will not work cause now the databasejoin dropdown consists of only one value - the 10 status.

Am i doing something wrong, or is it the default value setting not working in fabrik?
 
I can't see a problem with setting a dbjoin default.
Are you coming from a search form, a related data link...?
Anything in "Advanced" Eval options?
 
I finally found out whats going on, but dont know how to get pass it.

What i am doing is to click "Add new" from a list, and a new form is loading. The list is displayed using an article that displays 3 lists, one with each set of status.

Each list are opened with its own set of settings/filters. And seems like if i choose "Add new" from the first list, the status dbjoin is set to 40 (default should be 10)
And this is the command for the list. I thought it should only use 40 as the selection criteria (selection criteria works)
{fabrik view=list id=1 ac_salg___statusferdig[value]=40 ac_salg___statusferdig[condition]=< showfilters=0}

And if i select "Add new" from the second list, the status dbjoin are set to 80 (new forms should initially always set status to 10)
Command is like this.
{fabrik view=list id=1 ac_salg___statusferdig=80 showfilters=0}

So, what to do/how do i fix this ?
 
So i managed to solve it in some way.
I put the hide-add=1 in all lists like this: {fabrik view=list id=1 ac_salg___statusferdig=80 showfilters=0 hide-add=1}
Then i created a hidden menu item opening the correct form for this list. And created a "Add new" text/link in the joomla article that are linked to the hidden menu item.
Dont know if this was the easyest way to solve it, but as long as it works :)

And i forgot in my previous post, thank you for getting back to me Troester! :)
 
Back
Top