| User | Post |
|
1:58 pm January 27, 2011
| dgodfather
| | |
| |
|
|
How to create form variables:
This could be useful for others…
I'm attempting to use a combination of two "Data from entries" fields from two different forms to generate "Variables" for my forms. I select the first "Data from entries" field as the field I want to use to pull the data from as a record. I use the second "Data from entries" field as the field to generate the variable based on the first "Data from entries" field.
Example:
Form 1:
Field 1
Field 2
Form 2:
Field 1 (Data from entries) – I select an entry from field 1 of form 1.
Field 2 (Data from entries) – I select Field 2 with the following Field Options:
Display As: Just Show It
Hide this field unless the value of: Field 1 (Form 2) = Anything
Variable = (The value shown in Field 2 is now the variable that I've created based on values in other fields)
For my particular instance (Example):
Form 1:
Field 1: Name
Field 2: Email
Form 2:
Field 1: I select John Doe (Data From Entries in the Name field of Form 1)
Field 2 (With the following options):
Display As: Just Show It
Hide this field unless the value of: Field 1 (Form 2) = Anything
Email = johndoe@email.com (Generated based on the results from the Name selected)
My question/comment/suggestion:
I think it's time we introduce some sort of function that defines variables based on existing entry records and allow if/else options based on those variables for both forms and views.
I would like to be able to select the generated email as an option in the "and/or" portion of my Form Notification Options. Can this be done or added in the near future?
|
|
|
2:01 pm January 27, 2011
| Steph
| | |
| |
|
|
I've added linked fields into the field drop down for custom displays and values in the email (for version 1.4.5). However, I didn't think to add them on other places like that. I'll look into it.
|
|
|
7:10 am February 1, 2011
| dgodfather
| | |
| |
|
|
Variable Vs. "Just Show It"
Would it be okay to change the "Just Show It" function to "Show Variable" and create the appropriate input type with the variable shown as read only. The current "Just Show It" just grabs the text and displays it in a simple text form that isn't usable. I think it would be more beneficial to the community if this variable was automatically set as an input field (read only) and was usable in different areas of your forms.
I'm sure you've thought about this some Steph. What's your thoughts and future plans on this kind of functionality?
|
|
|
7:54 am February 1, 2011
| Steph
| | |
| |
|
|
The fields linked through a "Data from Entries" field are now listed in the field drop-downs for use in custom displays and success messages. Is this sufficient for you? What specifically are you trying to do? Client-side javascript? Or something else?
|
|
|
8:31 am February 1, 2011
| dgodfather
| | |
| |
|
|
I'm just not happy with how it actually displays the text as simple text. I'm having some display issues with my current theme that could be worked around with some manipulations. I have issues with it disappearing and appearing depending on which drop down options are selected. In certain cases I would like the data stored as well and if the value was inserted into a and input field it would make the value useable in all forms.
|
|
|
10:02 am February 3, 2011
| Steph
| | |
| |
|
|
The problem with saving a copy of the info from another form, is that then the data is duplicated. In some cases this might not be a problem, but I have issues with duplicated data that requires editing in multiple places. I'll have to think about what the options could be. As far as the looks go, I belive there is a div around the text that you could use for styling. I don't remember at the moment what it is though.
|
|
|
10:57 am February 3, 2011
| dgodfather
| | |
| |
|
|
If you can come up with the solution then that would be great. It doesn't have to saved be in an input field, it just needs to be able to be saved in some way. It doesn't have to be duplicated if you can find a way to store the record so that it is useable in other forms, that would be what I'm looking for.
|
|
|
11:18 am February 3, 2011
| Steph
| | |
| |
|
|
When you say "usable in other forms", what exactly do you mean? I'm not understanding.
|
|
|
12:26 pm February 3, 2011
| dgodfather
| | |
| |
|
|
Form 1:
Field 1: Name
Field 2: Email
Form 2:
Field 1: I select John Doe (Data From Entries in the Name field of Form 1)
Field 2 (With the following options):
Display As: Just Show It
Hide this field unless the value of: Field 1 (Form 2) = Anything
In the example above I want the value of Field 2 in Form 2 to be saved to the database for that particular form in some way such that I can use that value in any new or existing "Data From Entries" feilds in future forms and so forth. Kind of like a nested reference, if that makes any sense.
In other words I want to be able to use the value shown in Field 2 of Form 2 as a variable that can be used in any other form. (In the data from entries it would be selectable)
|
|
|
7:59 am February 4, 2011
| Steph
| | |
| |
|
|
I think I understand the problem, and I'll look into adding a hidden field and/or a text field option.
The current built-in way of doing this, would be to nest your "Data from Entries" fields. Some users are doing this with country -> State -> area -> city selections. Would this be an option in your case?
|
|
|
8:49 am February 4, 2011
| dgodfather
| | |
| |
|
|
I think that would be quite similar. Options are pulled from fields in one form based on the data selected in another. (Similar to how the country -> State -> area -> city would work) It needs to work with as many of your plugins input types as possible. (i.e. date, time, text area, text input… ect)
You are doing a great job with this plugin Steph! How is the new version coming along? Will it be available soon?
|
|
|
5:03 pm February 11, 2011
| Steph
| | |
| |
|
|
Sorry for the delay on this. Thanks for using the Pro forums for faster responses. Just got back from a spur-of-the-moment vacation, so hopefully I'll get have some time to work on finalizing this release and having it ready sometime next week. No promises, but hopefully.
|
|