Announcement

Collapse
No announcement yet.

Prompts

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

    Prompts

    Hi,

    I've created a Prompt Field on my site Test Site called Special requirements.
    The idea being that the customer can enter some ad hoc requirements on certian products.

    What I've noticed is that if you don't enter any data into the field then you can't add to the basket and continue with the purchase.

    Is there a way to flag this field as not mandatory or is there a way to give the field a default value ?

    Thanks

    #2
    Knowledge base - How can I make the "Other Information" prompt optional.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Where you see - value="", add something in between those quotes as the default text.

      Comment


        #4
        Thanks for your help.

        Not sure where you mean Lee?

        sub InfoValidate
        {
        my $sProdref = shift; # the reference of the product
        my $sInfo = shift; # the value of the field
        my $sPrompt = shift; # the prompt for the field
        my $sMessage;
        #
        # The default processing doesn't depend on the product reference
        # If you want product specific prodessing the edit the line
        # below as appropriate
        #
        #if (length $sInfo == 0) # if there is no info, reprompt
        # {
        # $sMessage .= ACTINIC::GetPhrase(-1, 55, "<B>$sPrompt</B>") . "<P>\n";
        # }
        if (length $sInfo > 1000)
        {
        $sMessage .= ACTINIC::GetPhrase(-1, 56, "<B>$sPrompt</B>") . "<P>\n";
        }

        Comment


          #5
          Lee was describing a way to add some default text (like "None...") into the prompt field the customer sees.

          You'd do this by duplicating your usual product layout and in that copy look for the line
          Code:
          <input type="text" name="O_<actinic:variable Name="ProductID"/>" size="40" maxlength="1000" value="" />
          and replace it with
          Code:
          <input type="text" name="O_<actinic:variable Name="ProductID"/>" size="40" maxlength="1000" value="None..." />
          Use your normal product layout for products where you want the customer input to be mandatory and use the modified one for products where it's optional.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thanks Norman

            Comment


              #7
              Hi,

              I tried changing it but it still remained the same

              <textarea name="O_<Actinic:Variable Name="ProductID"/>" rows="5" cols="38" maxlength="1000" value="none" /></textarea>

              Comment


                #8
                You've changed to a text area I see, maybe you should get it working as standard first? Gotta walk before you run, change too many things at once and you will get yourself into a right pickle.

                Comment


                  #9
                  Exactly. Changing more than one thing at a time is asking for trouble. Any HTML reference will tell you how to set a textarea's initial value.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Easy tiger....

                    I didn't change it... That's how it is in the advanced user guide...


                    1. Select your product layout in the 'Design' tab and locate the following line:

                    2. Replace this line with the following code:
                    <textarea name="O_<Actinic:Variable Name="ProductID"/>" rows="5" cols="40" maxlength="1000" value="" /></textarea>

                    Comment


                      #11
                      Originally posted by Faulkds View Post
                      I didn't change it... That's how it is in the advanced user guide...
                      LOL Darren, if you have changed to something from the AUG, then by definition it is not standard and therefore a change.

                      That is how the AUG illustrates how to make the prompt optional? The article from the AUG that I recall reading, has no reference at all to what you mention, so one presumes (maybe incorrectly) that you are doing more than one thing at the same time? I'd guess at converting to a text area AND making it optional.

                      Our suggestion is get the optional prompt right first, then convert to the text area.

                      Comment


                        #12
                        Lets be honest Lee.

                        Would I have come up with that solution on me own?

                        Thats how it is in the user guide....

                        Anyway...

                        What can I do to define the value...

                        Comment


                          #13
                          It's still a change lol, we are saying do one thing at a time, what's hard to understand about that? It's immaterial who provides it, just make sure each step works first, before the next one is put in place.

                          Follow Norman's advice about finding how to setup the default value.

                          Comment


                            #14
                            Thats how it is in the user guide....
                            Then you should have told us that in your first post. If we don't know that you've modified something then we can only give help regarding the normal setup.
                            Norman - www.drillpine.biz
                            Edinburgh, U K / Bitez, Turkey

                            Comment


                              #15
                              Sorry

                              Comment

                              Working...
                              X