Jump to content

Search the Community

Showing results for tags 'customfields'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • WHMCS Beta Program
    • WHMCS 8.7 Beta Discussion
  • The latest WHMCS Release
  • The Latest from the WHMCS Team
  • WHMCS.Community
    • Community Announcements
    • Introduce Yourself
  • Using WHMCS
    • Pre-Sales Questions
    • Admin & Configuration Questions
    • Installation, Upgrade, and Import Support
    • Using WHMCS
    • Troubleshooting Issues
    • Vendor Discussions
  • WHMCS Showcase
    • Showcase Your Site
    • Share Your Best Practices & Tips
  • Developing & Extending WHMCS
    • Third Party Add-ons
    • Service Offers & Requests
    • Developer Corner
    • Building Modules
    • Share Ideas for WHMCS Modules
  • Community Competitions
    • News, Announcements & Blogs from WHMCS
    • Competitions
  • General Discussions
    • General Discussion
  • General Feedback & Assistance
    • Feedback
    • WHMCS.Community Tips & Tricks
  • Third Party Developers's Topics
  • Turkish International Discussions's Topics
  • Russian International Discussions's Topics
  • Spanish International Discussions's Topics
  • Portuguese International Discussions's Topics
  • French International Discussions's Topics
  • Italian International Discussions's Topics
  • German International Discussions's Topics
  • WHMCS Brasil's Topics
  • WHMCS Brasil's Tópicos
  • ModulesGarden Club's Topics
  • Hungarian International Discussions's Segítség
  • ThemeMetro Club's Topics
  • WHMCS Services Club's Topics
  • WHMCS Global Services Club's Topics
  • Katamaze's Free Scripts
  • Katamaze's Module Support
  • Zomex Club's Topics
  • 0100Dev Club's Topics

WHMCS Version

  • V8.6.x Hotfixes
  • V8.5.x Hotfixes
  • V8.4.x Hotfixes

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 8 results

  1. ``` } catch (Exception $e) { // Record the error in WHMCS's module log. logModuleCall( 'vps', __FUNCTION__, $params, $e->getMessage(), $e->getTraceAsString() ); return $e->getMessage(); } return 'success'; } /* testing code $data = array( 'error' => 'Custom error testing', 'success' => 'success', 'data' => $data ); return $data; } */ /* use WHMCS\Database\Capsule; ``` It's Lavarel framework https://developers.whmcs.com/advanced/db-interaction/ //This is example custom filed that i have on //product $vpsusername = $customfields['VPS Username']; /* Now I can enter and save VPS Username field in WHMCS client product admin area but I would like to automatically generate service username and password and update customfield value in database. By looking into database I found how is value of customfield saved. */ SELECT * FROM `tblcustomfieldsvalues` ORDER BY `tblcustomfieldsvalues`.`updated_at` DESC relid 216 Hello, I'm building custom server module for automatic vps setup based on client order. Main part is finished when order is accepted server building is started and everything is working great. Now I want to extend and improve module with new functions. 1. On module _Create i would like to update automatically generated service username and password and update that generated values to customfield values in database. How to do that and if it's even possible? 2. I have an issue where I can't get custom return in latest WHMCS update. Earlier you could return success or custom message. Now custom message is not accepted for some reason only success or error is . Question is how to get custom errors or custom return messages back from remote script. Only success is accepted as whmcs solution or I'm missing something. Thank you in advance
  2. I hope someone has knowledge about this .. I find very little information about it. I hope someone helps me. I am trying to prevent users from being able to change some fields in their profile. I found the following function: https://developers.whmcs.com/hooks-reference/everything-else/#customfieldsave <?php add_hook('CustomFieldSave', 1, function($vars) { return array('value' => 'overridden value',); }); this prevents any field from being editable, however, how can I select a specific field? img: someone posted an idea in 2019. however it doesn't work, because fieldid and relid return NULL from $vars any idea? I just need to select the fields that I want to prevent from being edited.
  3. I would want to access my product moduleConfigOption1 inside CustomFieldSave hook add_hook('CustomFieldSave', 1, function($vars) { $customFieldValue = \WHMCS\CustomField\CustomFieldValue::firstWhere([ 'fieldid' => $vars['fieldid'], 'relid' => $vars['relid'] ]); // this works $client = $customFieldValue->client; $customField = $customFieldValue->customField; $customFieldValue->service; // this is null $customField->product; // null here too }); According to the document https://classdocs.whmcs.com/8.1/WHMCS/CustomField/CustomFieldValue.html CustomFieldValue has a public property name service, but it's null in my code so I can't do this:
  4. Good day, I require assistance with custom fields, I need to pass 4 custom fields inputs to an external database, array( '$params[‘customfields’][‘Username’]', '$params[‘customfields’][‘Email’]', '$params[‘customfields’][‘Cellphone Number’]', '$params[‘customfields’][‘Password’]', ); how do I use the above custom fields in a SQL query? Any assistance would be greatly appreciated, thanks.
  5. Hello, I'm working on a python script and i'd like to insert customfields on the updateclient call. This is a json of tblcustomfields {"id":"2","type":"client","relid":"0","fieldname":"status","fieldtype":"dropdown","description":"","fieldoptions":"notVerified,verified","regexpr":"","adminonly":"on","required":"","showorder":"","showinvoice":"","sortorder":"0","created_at":"0000-00-00 00:00:00","updated_at":"0000-00-00 00:00:00"}, tblcustomfieldsvalues {"id":"5","fieldid":"2","relid":"297","value":"verified","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"}, {"id":"6","fieldid":"3","relid":"297","value":"","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"}, {"id":"7","fieldid":"4","relid":"297","value":"","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"}, {"id":"8","fieldid":"6","relid":"297","value":"","created_at":"2019-11-05 04:38:50","updated_at":"2019-11-05 04:38:50"} Now when it comes to pushing the data, the documentation isn't clear. All i'm seeing is; customfields|string|Base64 encoded serialized array of custom field values|Optional Based on web searching, its not getting clearer. Here is a snipped of my last code. cstatus = { "fieldid": "2", "value": "verified" } encoded = base64.b64encode(b'cstatus') with requests.Session() as session_whmcs_bounces: session_whmcs_bounces.headers.update(whmcs_auth) whmcs_bounces_payload = { 'identifier': whmcs_ident, 'secret': whmcs_secret, 'responsetype': whmcs_response, 'action': "UpdateClient", 'clientemail': email, 'status': "Inactive", 'marketingoptin': 0, 'notes': '--- Bounces ---\nCreated: %s\nStatus: %s\nReason: %s\n---Bounces---' % (timeconvert,status,reason), 'customfields': encoded } i tried using the json.dumps/json.loads techniques to serialize the data, but in my mind i don't have to since the data is already serialized, i just have to encode it. I also tried variations, as in just the ID and value { "2": "verified" } / { "id": "2", "value": "verified" } and different combinations. Been at it for a few hours and can't seem to find much information. Ideally i'd like to update multiple sections based on the json reply. The flow i'm trying to achieve is this; Receive client information from datasource. { "email": "example@domain.tld", "type": "prospect", "status": "verified", "firstName": "Jon", "lastName": "Wong", "position": "Senior Linux Administrator", "sourcePage": "https:\/\/www.linkedin.com\/in\/jonthewong" } Add it or Update it into WHMCS Use extra fields as customfields. In this case, type/status/position/sourcepage The python code shown is for a separate part of the project, but the customfields base64,serialization still apply. If anyone has any experience or suggestions i'd appreciate it. Thank you. On a side note, I'm using Python 3.7 + requests/time/json/base64/getpass I'm open to adding other libs, but ideally i'd prefer using the ones i already have build for this env.
  6. Hi all i need to solve a problem with a wrong invoice ( obv paid from my client ) due a wrong data insert in registration from client. in my 7.5 whmcs version there's checked "Store Client Data Snapshot" option and it's working correctly, i need so ( i think that is the only way ) modify wrong data from db table mod_invoicedata.customfields and mod_invoicedata.clientdetails but value that i need to change is into a big array and i don't know how touch correctly it. Someone has some suggestions or workaround to solve this problem that i think could be really common after whmcs upgrade system and changing ? Thank you so much. Regards
  7. Hello how do I get the customfields values in gateway modules? Can I get the value of customFields by name? I did a lot of tries, but I didn't figured out... In Gateway config module I should set the ID of each customfield. Exemplo: ID Cutomer Field: 2 | Name: CPF ID Cutomer Field: 15 | Name: WhatsApp ID Cutomer Field: 19 | Name: moipCC print_r($params["clientdetails"]["customfields"]); Array ( [0] => Array ( [id] => 2 [value] => 222745448840 ) [1] => Array ( [id] => 15 [value] => 16994513223 ) [2] => Array ( [id] => 19 [value] => ) How do I get the value of ID Customer Field 15 without know the Array key. Thanks
  8. Hello I'm trying to create a gateway payment integrate with whmcs credit card default system. In Gateway payment configs (admin/configgateways.php) I would like to set an option of each customfields with dropbox than input text. check the image: https://prnt.sc/jffxs1 I need to set it on method getwayname_config() check the image: https://prnt.sc/jffyap function GATEWAYNAME_config() { return array( // the dropdown field type renders a select menu of options 'dropdownField' => array( 'FriendlyName' => 'Dropdown Field', 'Type' => 'dropdown',//// HOW TO SHOW CUSTOMFIELDS INTO DROPDOWNFIELD? 'Options' => $params["clientdetails"]["customfields"], 'Description' => 'Choose one', )); } How to populate the dropdown field on admin payment gateway config with customsfields names? any help will great!!! thanks
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated