This topic is locked
[SOLVED]

 Field Events

7/17/2019 11:25:39 PM
PHPRunner General questions
lefty author

Is there any documentation besides adding a variable which adds 2 to a value . Really . Can You give us some more examples.

I am trying to get values from another table and focus or blur . The only example for field events is adding 2 to a value , not good

enough for What I am looking for PHPrunner . I can do in other programs but the API for field events is basic at best . Please help.

I am looking to grab field in from another table and base on two field values in current table , if no match blur and if match focus.

Anyone with any ideas or doc's for client / server / client after?? Thanks.

admin 7/18/2019

We have another example that adds 3 to the field value, will that help?
Seriously though, what is the actual problem here? You need to retrieve data from another table? Use Database API in Server event. Field events are similar to buttons and similar to all other events. You can use any Javascript code in ClientBefore, ClientAfter events and any PHP code in Server event.

lefty author 7/20/2019



We have another example that adds 3 to the field value, will that help?
Seriously though, what is the actual problem here? You need to retrieve data from another table? Use Database API in Server event. Field events are similar to buttons and similar to all other events. You can use any Javascript code in ClientBefore, ClientAfter events and any PHP code in Server event.


I am not looking for basic operators / numeric values in before client on how to add 2 to a value nor 3 . , I am looking to take whatever is typed in the field to check against my server event and I happen to already know the query for the Database API that's the easy part . I need to pass the value typed in by the user to before client first then server event to , Check value , then if the query value is invalid I need to after client event echo a message next to field with an error messageI guess it would be with a div statement next to field . Have searched doc's and took a look at blog with the subcategories example but not what I am looking for . I am looking for an example of client before value on entry, to pass values , to server ( check value ) and use Javascript method blur() after client or focus() with the correct value, with an echo statement.



For Example :
Field 1 : users types in a company ,

Field 2 : user types in customer id ( there could be identical customer id's )

Field 3 : user type in product code

if user types in field 1 and field 2 but field 3 does not belong for his choice ( which is determined from another table "ON SERVER" ) then I need to

loose focus or blur() field 2 and field 3 .
I am aware that the dropdown wizard can do most of this but there is a multiple outer join statement which complicates the picking up of field values for dependant dropdowns ( Red Box Does not cut it ) need error message. I have already looked at Tips and Tricks issue is it does not help me with error messages and blur() .
Or do I have to custom code this in html/javascript with custom function and AJax and POST or Jquery to use this in PHPrunner instead of custom solution . If so where would I put the code in PHPrunner 10.2 build 33375 .I thought this was all deprecated in 9.8. as far as using the editor as opposed to designer in html to accomplish something like this.

Thanks in advance of your response.

admin 7/22/2019

Lets start with the manual:

https://xlinesoft.com/phprunner/docs/field_events.htm
The first two links on this page explain how to access fields in field events:

https://xlinesoft.com/phprunner/docs/how_to_access_fields_in_the_field_events.htm
Also how to pass data between events like ClientBefore and Server:

https://xlinesoft.com/phprunner/docs/inserting_button.htm?anchor=passing_data

lefty author 7/22/2019



Lets start with the manual:

https://xlinesoft.co...ield_events.htm
The first two links on this page explain how to access fields in field events:

https://xlinesoft.co...ield_events.htm
Also how to pass data between events like ClientBefore and Server:

https://xlinesoft.co...or=passing_data


Thanks,

The third one , I was looking for . That should be a start .