Announcement

Collapse
No announcement yet.

Other info fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    I've run into problems trying to implement this as well. But, I think the problems are related to the fact that I made the changes listed in the AUGv7 to change the input from a text field to a textarea. Could you someone point out exactly which portion of the code makes the field not required?

    I have currently modified Phase 2161 to:
    %s<textarea name="%s" style="width:300px;height:70px;" %d maxlength="%d">%s</textarea>

    The other idea I was throwing around was to write a bit of javascript to automatically set this field to 'n/a' if it was left empty. That might actually be a really easy solution to the problem, but I'm not sure how I could get the code to be specific to this section. Maybe I can replace the single add to cart button NETQUOTEVAR with actual code?
    Matthew Cowgur
    DARMEDIA, Inc.

    Comment


      #17
      Matthew,

      Try this:- Edit ActinicOrder.pm and replace
      Code:
      	if (length $sInfo == 0)							# if there is no info, reprompt
      		{
      		$sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
      		}
      	elsif (length $sInfo > 1000)
      with
      Code:
      #	if (length $sInfo == 0)							# if there is no info, reprompt
      #		{
      #		$sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
      #		}
      	if (length $sInfo > 1000)
      This should work with either the normal Other Info or the TEXTAREA mod.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #18
        Fantastic! Thanks very much Norman.
        Matthew Cowgur
        DARMEDIA, Inc.

        Comment


          #19
          Actually, it was lifted from the Knowledge Base.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #20
            Other info input

            Originally posted by Nadeem
            Nadeem, To pick up on this thread...

            I'm working through the making the other info field non-compulsory. This seems to be fine.

            Okay you need to edit the ActinicOrder.pm in notepad, Search for 2161 and replace

            Code:
            $sHTML = ACTINIC::GetPhrase(-1, 2161, "", $sIndex, 35, 1000, $sValue, 
            $sStyle);
            with

            Code:
            # $sHTML = ACTINIC::GetPhrase(-1, 2161, "", $sIndex, 35, 1000, $sValue, $sStyle);
            $sHTML = sprintf("%s<INPUT TYPE=text NAME='%s' SIZE='%d' MAXLENGTH='%d' VALUE='%s' %s>","", $sIndex, 35, 1000, $sValue, $sStyle);
            Kind Regards
            With the default text in -1, 2161 if you change the size variable to an integer it changes the size of the input box. When i apply the patch as above and alter the default text in -1, 2161 to as instructed when i try to do the same it has no effect. How can i, once this patch is applied, change the size of the input box?

            Thanks in advance

            Randalldon

            Comment


              #21
              When patching prompts in Design / Text, do not delete any %s or %d tags. These are format strings for the passed in variables and must remain in the correct number and sequence.

              So to change

              %s<INPUT TYPE=text NAME="%s" SIZE="%d" MAXLENGTH="%d" VALUE="%s" %s>

              to a size of 10 do this

              %s<INPUT TYPE=text NAME="%s" SIZE="10" dummy="%d" MAXLENGTH="%d" VALUE="%s" %s>

              where the dummy="%d" is benign dummy HTML (unknown tags get ignored) that gobbles up the size variable.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #22
                Cheers Norman. Your help is much appreciated!

                Randalldon

                Comment

                Working...
                X