20 Posts
cedTV
8 years ago
11
Topic

hello, I need to get value from another field in the same form to be used as a condition of "WHERE" query on the field of form. I need the same function of SD databaser does on List & Search ... I tried with $ _SESSION ["fieldname"] but the query doesn't work. Thanks 

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
3
Level 1

Hi,

this question is too generic, you will need to give some more details about what you are trying to do - which field do you use, which view (content, search..) etc

20 Posts
cedTV
8 years ago
2
Level 2

hello, thanks.

In my form should I use a value of step of select dynamic cascade when selected, to use it like dynamic value with "where" on free query to find another  value on another field in the same form, or if I can not use the value directly from the step of select dynamic cascade, I find that value automatically filling in another type text field with a trigger filled by. Then however this value should I use it in a free query to extract value from another field on db. All this in a form and not in a list and search. 


everything comes from the fact that on a select dynamic cascade can be used only a parent field of previus step and not another step of same select dynamic cascade. On the select dynamic cascade that already use (with three step) I would insert another voice (fourth) but has no parent field on the third step, but on the second step. I use it also as a parent of the third item.

I hope I was a bit more accurate ... I'm sorry for my bad English. thank a lot

4229 Posts
Kadministrator
8 years ago
1
Level 3

Hi,

I don't think this is possible , you can use url variables and user object values, but not values form another field.

20 Posts
cedTV
8 years ago
0
Level 4

What do you mean "you can use url variables and user object values"?

thanks

4229 Posts
Kadministrator
8 years ago
3
Level 1

If field that you are talking about is one of SQL pack fields, then you can use url variables like that $uri->getValue('variablename') eg. 

$uri->getValue('catid') or $user->variablename .e.g. $user->id to get current users id

20 Posts
cedTV
8 years ago
2
Level 2

ok , but the value that I would not have it in the url , I find it when I select the second choice of the select dynamic cascade , do not pass anything in the url...

4229 Posts
Kadministrator
8 years ago
1
Level 3

<es, unfortunatelly this are only dynamic variables that work.

1283 Posts
Bucklash
8 years ago
0
Level 4

Hi

SCENARIO:

In a Form, using SELECT Dynamic Cascade, I want to use the values selected in more than one of the cascading select lists.

You can not use (in a beforestore field)

$someVar = $fields['one_of_the_cascading_select_lists']->form;
or 
$someVar = $fields['one_of_the_cascading_select_lists']->value;

So I suppose THE solution is to prefill a hidden field with the select lists value using jQuery/javascript and then store those hidden fields where necessary, that right? 


Bucklash

4229 Posts
Kadministrator
8 years ago
1
Level 1

Hi,

you caged your question, did you solve this? I haven't tried it myself, but theoretically it should be possible to have multiple children reacto to the single parent value change if you set them all the same way as you would if there were only one.

1283 Posts
Bucklash
8 years ago
0
Level 2

Hi Klas

I have had to sidetrack so not tried it.

I initially wondered whether it was to do with whether the cascading field had storage set or not, anyway

I have had to rethink the structure of my site so will revisit this in future....

17 Posts
erickmines
8 years ago
0
Level 1

This  plugin does what you need. https://www.seblod.com/store/extensions/2311

Use on this project, which use 2 types of content. The right form is a type of content and needed for various values of parent content (title, price, etc.) and that they can be sent by email

Get a VIP membership