michelle Posted February 15, 2008 Share Posted February 15, 2008 Is there a way to add custom fields that only admin can select the answer to *and* that the customer sees (but can't modify)? For example: Registered Reseller: (Yes/No) Thanks, Michelle 0 Quote Link to comment Share on other sites More sharing options...
mrprez Posted February 15, 2008 Share Posted February 15, 2008 Yes, there is. Configuration/Custom Client Fields/Drop Down Then in the Field Options Yes,No John 0 Quote Link to comment Share on other sites More sharing options...
michelle Posted February 15, 2008 Author Share Posted February 15, 2008 Thanks for your response, Mr Prez/ However, if you choose the "Admin Only" checkbox, it is not viewable to the customer. Only to admin. At least that's what I'm seeing. I want to be able to add fields that only I can select/modify the answers to while at *the same time* the customer can see them. For instance, in the example above, I want the customer to know if they are a registered reseller or not (and if not, so they know they need to sign up). Any ideas how I could do this? thanks! 0 Quote Link to comment Share on other sites More sharing options...
ask21900 Posted February 15, 2008 Share Posted February 15, 2008 I'm not sure, but you might be able to find where it displays the custom field in the templates. It might have a conditional (ie: {if loggedin} ), by removing that, you would be removing the permissions needed to view the field. In theory this would work, depending on how the system is designed. Only way to tell for sure is to look for it, and try to change (or ask Matt) 0 Quote Link to comment Share on other sites More sharing options...
mrprez Posted February 15, 2008 Share Posted February 15, 2008 Thanks for your response, Mr Prez/ However, if you choose the "Admin Only" checkbox, it is not viewable to the customer. Only to admin. At least that's what I'm seeing. I want to be able to add fields that only I can select/modify the answers to while at *the same time* the customer can see them. For instance, in the example above, I want the customer to know if they are a registered reseller or not (and if not, so they know they need to sign up). Any ideas how I could do this? thanks! So, don't check that box. Check the one that says show on order form instead. 0 Quote Link to comment Share on other sites More sharing options...
Iceman Posted February 17, 2008 Share Posted February 17, 2008 That does not stop the customer editing the field data though. You will need to edit the template to only SHOW the value as data only and not as a FIELD with values that can be edited. Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted March 2, 2008 Share Posted March 2, 2008 How to get only a value of a custom field? I tried $customfields[3], $customfields[3].value, $customfield[3], etc. But I can't get just the value. Can someone please help with this. 0 Quote Link to comment Share on other sites More sharing options...
Iceman Posted March 3, 2008 Share Posted March 3, 2008 Try {$customfields.3.value} I think thats what we did. Cheers, Paul 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted March 3, 2008 Share Posted March 3, 2008 No, that's not that. I am not getting anything with this. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted March 3, 2008 WHMCS Developer Share Posted March 3, 2008 Try putting {debug} in your template and you will see the names of the fields that can be used, 0 Quote Link to comment Share on other sites More sharing options...
dexus Posted March 3, 2008 Share Posted March 3, 2008 That's it actually, it's just little bit confusing... customfield[3] is actualy -> $customfields.1.value WHMCS is counting just visible fields on client side, and not by real custom field ID... It's not realy great, because if you add or remove some fileds you will have to edit all templates that you modified because field ID's will change. Thanks for help. 0 Quote Link to comment Share on other sites More sharing options...
amol.karande Posted March 3, 2008 Share Posted March 3, 2008 How to get only a value of a custom field? I tried $customfields[3], $customfields[3].value, $customfield[3], etc. But I can't get just the value. Can someone please help with this. I dont know whether this will help you or not but I want to tell you that by adding code as {php} $customflds = $this->get_template_vars('customfields'); print_r($customflds); {/php} this will print whole arrar of custom fields the nI think to get specific value you need to use syntax as $customflds[1]['id'] where id is name of the field let's try 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted March 3, 2008 WHMCS Developer Share Posted March 3, 2008 I dont know whether this will help you or not but I want to tell you that by adding code as {php} $customflds = $this->get_template_vars('customfields'); print_r($customflds); {/php} this will print whole arrar of custom fields the nI think to get specific value you need to use syntax as $customflds[1]['id'] where id is name of the field let's try and adding {debug} to your template will open a new window with your variables on. Have you tried this? 0 Quote Link to comment Share on other sites More sharing options...
HiDef-Laws Posted March 4, 2008 Share Posted March 4, 2008 I was working on this all day. Here is the string you want: <tr><td class="fieldarea">{$customfields.1.name}:</td><td>{$customfields.1.value}</td></tr> <tr><td class="fieldarea">{$customfields.2.name}:</td><td>{$customfields.2.value}</td></tr> <tr><td class="fieldarea">{$customfields.3.name}:</td><td>{$customfields.3.value}</td></tr> Now, I put mine in that clientareaproductdetails.tpl replacing the "Add-Ons" because I do not use it and changed the header to something more like "Specific Connection Information". 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted April 1, 2008 Share Posted April 1, 2008 and adding {debug} to your template will open a new window with your variables on. Have you tried this? Many thanks for the guidance on this. For those following, I found I had to use both options as my debug window showed the first 50 characters of each field, but finished with a .... . . . . . . ..........therby leaving me wanting for the rest of the text. therefore i could only get the rest of the text by outputting as above, and viewing my page source. It got me there in the end though. Cheers 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted April 4, 2008 Share Posted April 4, 2008 maybe this should be a feature? Have a nother option with, "Can client see option: Yes / No" and then "Can client edit option: Yes / No" 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted April 6, 2008 Share Posted April 6, 2008 I have the need for this too. A read only field would be great 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.