mcpacific Posted March 30, 2013 Share Posted March 30, 2013 I'm creating some custom modules that require Custom Fields. I would like to have some fields use default values, supplied via Client's Details, such as: $emailaddress = $params['customfields']['Email Address']; if (!$emailaddress) $emailaddress = $params['clientsdetails']['email']); However, I think it would be nice for the user to see that these fields could be left blank, and if so, they would be populated with the user's information. This could be done via the "Description" in the Product setup > Custom Fields I suppose, but maybe there's a better way. All this works fine except these default values don't get updated in the table tblcustomfieldsvalues. To do this, a simple update_query seems to be in order, such as: update_query("tblcustomfieldsvalues",array("value"=>$emailaddress),array("fieldid"=>XX,"relid"=>$params['serviceid'])); However, this assumes fieldid is known. This will value will be different in each WHMCS database using this module. How would I compose the update query to update a range of custom field values at once? 0 Quote Link to comment Share on other sites More sharing options...
Roli Posted August 7, 2020 Share Posted August 7, 2020 I also need an answer to this question. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.