You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to get and set value of chat request form filed using hooks

Received Response
17
Views
3
Comments
edited Jun 23, 2018 3:02AM in Customer Portal 3 comments

Content

In chat_launch.php page ,I add a custom field named mobile_phone_number of contact to the form,I want to check if exist contact with the mobile number before submit the chat request form. So I used pre page render hooks,in custom model,How can i get mobile number value of chat request form , when I logmessage $hookdata['data'],but found array is empty,I want to get and set value to the page form field.

Can you give some advices for me ? thank you.

Version

1

Code Snippet

             function checkMobile($hookdata)
    {  
		$CI = get_instance(); 
        $url = $_SERVER['REQUEST_URI']; //app/chat/chat_launch/chat_data/cV9pZD0xJnN0YXRlPTEwJiZoYXNoPTE1Mjk2NTA3MTc2MzNybHJpbXk./request_source/7
        $page = $CI->page;  //chat/chat_launch
	if( $page=='chat/chat_launch'){
		$chat_launch=$hookdata['data'];
		logMessage($hookdata['data']);
		//get contact
		$mobile='';
}
} 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!