Thank You for your answer.
Now I can read value of my text box:
jQuery(document).ready(function(jQ) {
var admin_list;
admin_list = jQ('#admin_list').val();
alert(admin_list);
});
but realy I do not want to alert it, but use this variable in php.
I do not know how to transfer var from javascript(my text box value) to php tags, where i can do some more action. Is it possible??
Hi xquest,
You've lost me. What exactly do you need to do?
Bob
Hi.
I just want to read value from 'text box' , and later I want to operate this value by means of php code.
So I want to do 2 things:
1. read value from text box ('load javascript' because custom code doesn't work in this case)
2. operate with this value with php code.
Hi xquest,
I'm sorry but that still makes no sense to me. Please spell out where you want to do this?
If you want to do this after the form submits then the value is in the $form->data[''] array - you can see it by adding a Debugger action to the form On Submit event.
Bob
Hi xquest,
But there is no data in a form element when the form loads unless you put it there?
I still have no idea what you are trying to do here :-(
Bob
oh, now I see.
So even In 'Designer mode' I have 'Text Box' with value 'some_text', this value is not transfered into my form (onload) yes ??
hmm, but visually I see this value.
So I want to ask what is difference beetween 'custom code' who can not read this value and 'load javascript' who can read this value.
Both this action are used in "on load form"
Hi xquest,
So even In 'Designer mode' I have 'Text Box' with value 'some_text', this value is not transfered into my form (onload) yes ??
Yes it is - as you have seen.
So I want to ask what is difference beetween 'custom code' who can not read this value and 'load javascript' who can read this value.
Custom code is PHP run before the Form HTML is created. Usually ti is used to prepare data for use in the form; for example to run a custom database query. The Load JavaScript action adds JavaScript to the Form HTML that can be run in the browser after the form is displayed.
I still have no idea what you are trying to do :-(
Bob
Ok, excuse me , I will try to show what am I doing😉
My target is to write id of special users (some admins, some registered) in hidden field value.
[attachment=0]1.JPG[/attachment]
Now before form appear I want to check if my user is one of them (special users). So in this place I want to read value of hidden field or text box, and i want to trim this text via php.
If user isn't "vip" some container will be hidden, other way some will be visibled.
Thank You Bob, I will try it in Your way.