Posts: 90
Threads: 30
Joined: Mar 2010
Reputation:
1
Feb 8th, 2011, 10:29 AM
Hi Ben,
i was wondering why my newest view refused to add new submissions through FORM TOOLS
until I found out that it is beacause of the filter which is activated.
Since new submissions are empty by default the filter will refuse to modify them when adding.
Would it be possible to set up default value for new submissions which are active as long as the value would otherwise be "NULL" as default. I now set it directly in the mysql-db. but it would be good to have a different default value for each view...
I know it is a rather special thing since most other users will mainly use the data submitted from outside FORM TOOLS. But at least for us the data admistration out of FORM TOOLS has very much potential.
If there is any existing feature for that which I still do not have discovered please let me know.
Cheers,
Hannes
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi Hannes,
Yes, this is a known issue - in fact, I was just looking at it last week.
I'd originally planned to solve it by automatically pre-filling all new submissions to contain whatever criteria was specified by the View (e.g. "attendee_type" == "Vendor"), but on closer inspection this wasn't realistic - or even possible. For example, for Views with filters that contain rules with the "!=" and "NOT LIKE" options, the code would need to insert values into those fields to match the criteria - and it would only be possible by using arbitrary strings. Secondly, if you had a View that only showed last year's form submissions, whenever you clicked "Add" - the only way it could possibly add a submission to appear in that View would be if it back-dated the submission date. This is obviously unacceptable!
So instead, I've added a section to all Views that let you specify default criteria for all new submissions added within Form Tools. It's a bit of a shame it was necessary, but it does actually add a little more control: even possibly result in minimizing work overall (e.g. you could set default values for various fields that would normally have to be manually set).
So... you have to wait for 2.1 again, I'm afraid!
- Ben
Posts: 1
Threads: 0
Joined: Jul 2011
Reputation:
0
In edit view
use Default Values for New Submissions
fill field with default view as filters
Thank you
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Yup! This feature was added in 2.1.0. Thanks for mentioning it, ndaruoke!
- Ben
Posts: 90
Threads: 30
Joined: Mar 2010
Reputation:
1
Jul 31st, 2011, 6:27 AM
(This post was last modified: Jul 31st, 2011, 6:28 AM by Hannes.)
Quote: In edit view
use Default Values for New Submissions
fill field with default view as filters
yes, that fully solves the issue.
Quote:Yup! This feature was added in 2.1.0.
a nice one btw, not only for this purpose...
Thanks a lot.
Posts: 9
Threads: 3
Joined: Aug 2011
Reputation:
0
Hi,
I was wondering if its possible to have the default value set as, lets say the client's username. Or anything from the database.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi DrkNT,
Interesting...!
The thread above is all about default values in the submissions, not clients accounts. I'm afraid you can't set default values for the main client data (first name, last name, email, company name, password), only the default client account settings.
But there are other possibilities.
1. If you use the Extended Client Fields module, you can control the default settings for any new fields you define.
http://modules.formtools.org/extended_client_fields/
2. If you're feeling ambitious (and this will take programming knowledge), you could investigate the Hooks Manager module and locate the appropriate hook (if it's defined) to set default values for the client accounts. I'm not sure this would work terribly well, but it may work...
- Ben
Posts: 9
Threads: 3
Joined: Aug 2011
Reputation:
0
Hi Ben,
Sorry, what I meant was to set the default values of the submission to be like the username or email. Currently the default values of the submission cannot handle variables that are used by the database.
So I was wondering, is a way to do it in form tools?
DrkNT
Posts: 2
Threads: 1
Joined: Dec 2011
Reputation:
0
I also face the same problem. After Filters Activated, What the clients submit is the blank data. And cna not modify the blank data. The clients can modify the data which they can view.
Posts: 1
Threads: 0
Joined: Sep 2012
Reputation:
0
Sep 12th, 2012, 1:08 PM
(This post was last modified: Sep 13th, 2012, 12:11 AM by boragoshop.)
Got the same problem, the client can add a new submission in the backend, but it is not displayed because of the filter settings. I want to match the filter so that the id of the client is automatically included as a not visible value that can be matched. A value that is the same for all clients does not work for me.
How about something like "{client:id}" which inserts automatically the client id of the logged in user into the form field?
|