Pre filter form

Status
Not open for further replies.

lknmedia

New Member
I have a table of advertisers. Each one is assigned to a specific market. When a sales rep enters a new ad for an advertiser I need them to be able to only see their market. Example:

User selects Enter New Ad.
1) Form is presented and user must Select Market and submit ->
2) The next form should only show those advertisers within the selected Market from above.
3) User selects advertiser and is presented with Enter Form ad (advertiser pre-populated from step 2 submit).

How do I accomplish step 2? I know you can do pre-filters on Table views but these are forms.
 
On your form elements you should have one that is set as a table join, joined to the table that you want to pull from
Then you need to edit the Where clause at the very bottom. You would need to restrict your join for each group.

This might mean creating a new form, group, and elements for each type of user, as I don't know of a way to change that dynamically.

Also this is an interesting section because if you select the advanced radio button then save it then edit it again you will be presented with the option to add additional joins. Sadly it's not documented at all.

Andre
 
Andre Lewis said:
On your form elements you should have one that is set as a table join, joined to the table that you want to pull from
Then you need to edit the Where clause at the very bottom. You would need to restrict your join for each group.

This might mean creating a new form, group, and elements for each type of user, as I don't know of a way to change that dynamically.

Also this is an interesting section because if you select the advanced radio button then save it then edit it again you will be presented with the option to add additional joins. Sadly it's not documented at all.

Andre

This is exactly what I am doing. Not the best solution but it will work for now.

Now I just need to find out how to get the ad_name info into the next form when using the fabrik_id as the join key.
 
Any posted form data is available in the current session, so you can have a hidden field with eval turned on and something like this in the default text:

return $_SESSION['fabrik'][formid]['elementname']['value'];

replace formid & elementname with the required data.

FYI The session structure looks like this:

Code:
Array
(
  [fabrik] => Array
    (
      [84] => Array
        (
          [id] => Array
            (
              [type] => 
              [value] => 62
              [match] => 
            )
        )
    )
}
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top