Jump to content

Order Form - Custom Field disabled


Sybille

Recommended Posts

Hi,

 

I added a custom field (Text Box) to the order form.

AdminTool_CustomField.png

 

There the user should tip in further information, but the text field is disabled.

Client_Order.png

 

I haven't found an option in the admin tool to allow user to write in to the custom field nor did I found a command in the script which could be responsible for that.

 

Thanks for your help.

Link to comment
Share on other sites

difficult to tell without seeing the code used and/or created, but i'd certainly be tempted to add that product custom field again and see if the second version appears to work... if so, delete the first (assuming no clients have used it yet - if they have, just untick the two checked checkboxes) and put it down to WHMCS.

 

if the second one fails, then there must be an error somewhere - I assume you haven't modified the templates in any way?

Link to comment
Share on other sites

the input field is created by WHMCS and will be outputted by {$customfield.input} - so I can only assume it isn't being created for some reason.

 

did you try adding a second field to see if that appeared ?

 

btw - did you try the breadcrumb hook I posted in the thread below ??

 

http://forum.whmcs.com/showthread.php?114986-Changing-Breadcrumbs-display-EVERY-step-of-the-Navigation

Link to comment
Share on other sites

Hi,

 

Thanks to all for your ideas. I double checked everything, but haven't found the failure till now.

 

I've added some screenshot, perhaps one of you find the mistake.

 

I also restored the configureproduct.tpl from a Point before I did any changes. But still if this original file it didn't worked.

 

- Removed -

Link to comment
Share on other sites

Hi,

 

Thanks to all for your ideas. I double checked everything, but haven't found the failure till now.

 

I've added some screenshot, perhaps one of you find the mistake.

 

I also restored the configureproduct.tpl from a Point before I did any changes. But still if this original file it didn't worked.

 

- Removed -

Link to comment
Share on other sites

as i'm typing this, the above attachments aren't available - so I can't see what you're seeing! :)

 

are you using custom fields anywhere else - client or support ?? what i'm wondering is if they're working anywhere? e.g if you've only installed WHMCS this month, perhaps some files got corrupted/missing during the initial installation - you might not necessarily have noticed an issue until now... it can often only take one corrupt file to cause an issue.

 

it's certainly not normal for a customfield to behave like that, so something is obviously not working correctly... if you're ruling out the templates, and there are no hooks that could be affecting this, then i'd be tempted to re-upload the 'whmcs/includes/' and 'whmcs/vendor' directories again - assuming you haven't made any modifications to any files within there (unlikely at this stage), uploading those files again shouldn't cause any new issues and might resolve this one.

Link to comment
Share on other sites

Thanks for your reply :)

 

I use the custom client field for the user registration (dropdown for the title) but this is a custom client field and not a product custom field. I haven't used product custom field till now.

 

I will try out your suggestion - asap

 

I try again with the screenshot...

 

Script

Script.png

 

WHMCS Admin - Custom Field

WHMCS-Admin.png

 

FTP Folder

FTP_Folder.png

 

Order Template

Order-Template.png

Link to comment
Share on other sites

I've changed the order form template in the meantime. I changed the template between I’ve posted the screenshot and my other posts). Sorry for the confusion.

 

- - - Updated - - -

 

I've found the problem! One of my hooks was responsible for the issue! The line in bold causes the error.

 

<?php
add_hook("ClientAreaPage", 1, function($vars){
   $customfieldid = 1;
   foreach ($vars['customfields'] as $index => $customfield){
       if ($customfield['id']==$customfieldid){
           $newInput = str_replace(">Herr<", ">".Lang::trans("Herr")."<", $customfield['input']);
           $newInput = str_replace(">Frau<", ">".Lang::trans("Frau")."<", $newInput);
       }
       [b]$vars['customfields'][$index]['input'] = $newInput;[/b]
   }
   return array("customfields" => $vars['customfields']);
});

 

I use this hook for my registration form. I added there a drop down field for the title. This hook should translate the options to make the dropdown multilingual. At the moment we're provide the portal just in German, but perhaps we will add translations for other languages at a later date. Therefore I created this hook (with lovely help from forum member) to prepare the custom field already for being multilingual.

 

What I have to change, to have my custom client field multilingual and be able to use custom fields for products with input fields?

 

I really appreciate your help I already received. Thanks again. Any idea is very welcome.

Edited by Sybille
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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