No announcement yet.

can we add some text AFTER the field!?

  • Filter
  • Time
  • Show
Clear All
new posts

  • can we add some text AFTER the field!?

    hi guys, anybody tried to add some text after the field? i mean as postfix or something... like if you want to put a Unit for the field...

    i read some manual things to do that, also i have in mind to to make the field then hide it and create one new field to join 2 and display them as variable

    is there any other easy straight forward way to do that within field settings itself?

  • #2
    you can always use JQuery and modify the html content of the td created by netmake, im not a jquery guru (Albert is that you? lol) but i think you can do it using

    PHP Code:
    window.GetElementbyID('<id of the td generabed by SC>').innerHTML window.GetElementbyID('<id of the td generabed by SC>').innerHTML '<Your suffix>' 
    the think is that you should make that into a jquery function and call it whenever appropiate, so the problem now is... how do you call a Jquery/javascript function in SC right?.

    Hope this helps.



    • #3
      hi sempai boss, and thanks for your input, it will help indeed

      i'm not really familiar with this way to do it

      although looks good if we can make it as jquery thing, else where to put that code!? i guess you are right dude, don't know how to implement that


      • #4
        i think you can echo it in the onload event and then call it with the sc_java_blabla (don't remember the name of the macro lol) when you need it >.<


        • #5
          I'm not sure I understood where\how you want this extra info displayed, but did you try this?:

          Fields->[yourfield]->Grid Lookup->Use lookup to display the field description->SQL Command -> SELECT ("text to be postfixed")

          You will get

          FieldLabel [FIELD CONTENT] text to be postfixed
          Last edited by robydago; 03-23-2015, 12:52 PM.


          • #6
            GET OUT OF TOWN BRAAAAHHHH... shoooowww meee shooowwww meeeeee =P

            And it works... =D aweeesomeeeee =D.


            • #7
              sempai kafecadm, i guess we have sempai roby too now

              thanks roby, nice idea will give it a try

              kafe dude i liked this too:" >.< " is it a cat looking at you? loool


              • #8
                Another solution is to use the help field and set that of type text. Then this text will be printed behind the field.
                Albert Drent
                aducom software netherlands
                scriptcase partner, reseller, support and (turn-key) development


                • #9
                  Good one Albert and roby - although Albert's is a bit more universal. What I mean is - depending on the field type, Grid Lookup is not always available.



                  • #10
                    albert your idea is universal as adz mentioned thanks

                    roby, what if your field is actually using that sql automatic to display the data, where to add ("prefix text") i tried with after the select throws error, did you try that with actual sql automatic lookup in use?


                    • #11
                      no, I didn't try.
                      I vote for Albert idea, even if I have no clue what he's talking about...

                      EDIT - just checked all field options in SC and found the Help option Albert is referring to.
                      I confirm my vote for his solution
                      Last edited by robydago; 03-24-2015, 01:04 PM.


                      • #12
                        sure dude, Albert hit the spot although the help text sometimes appear under the field, not next to it as a prefix, but also is wow!

                        but i was curious to see the sql method too, so can be used only if sql automatic lookup is NOT in use, will try it ASAP