Announcement

Collapse
No announcement yet.

WYSIWYG question

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

  • WYSIWYG question

    I guess no, but just to ensure,
    does anybody know if is there any way to get, for example, a value of an input element in a wysiwyg type field, to another field or as a variable?

    Thanks
    Last edited by Athensmusic; 04-24-2024, 02:41 PM.

  • #2
    it is possible using formula i guess.
    Rabii
    Web Dev

    Comment


    • #3
      Thats what Im asking for. About use of formula, but how...can't figure out any possible solution.

      Comment


      • #4
        you can use existing string functionality. e.g let say you have your wysiwyg in account called note and you want to inject into its content the name of the accoun, you can do it using formula as below

        PHP Code:
        note string\concatenate(note'\n''Another content here 'name); 

        You can even inject html into the field as below
        PHP Code:
        note string\concatenate('<button type="button" class="btn-xs btn-success" style="width: 80%;">',
        '<span style="color: #fff; text-decoration: none;">'string\length(name) ,'</span></a></button>');​ 
        Last edited by rabii; 04-24-2024, 03:07 PM.
        Rabii
        Web Dev

        Comment


        • #5
          Thanks rabii but I know that. If you read Im looking for the opposite. To get a value of an input element in wysiwyg field in another field of an entity.

          I do not know the use of "object" in formula eg .object\create() etc that could maybe do something with it. But as I started, probably it's impossible...

          Comment


          • #6
            so you want to get the value of the wysiwyg field into anther field of an entity ?

            To get a value of an input element in wysiwyg field in another field of an entity. (THIS IS NOT CLEAR)
            WHAT DO YOU MEAN BY GET VALUE OF AN INPUT ELEMENT ?
            Rabii
            Web Dev

            Comment


            • #7
              You do not need to SCREAM my friend. Don't you know what an input element is in html?
              In wysiwyg <input type="text" value=""></input>
              I hope I do not need to explain what the value is.

              Comment


              • #8
                no you don't need but you can figure it out yourself since you know better what an input element is in html
                Rabii
                Web Dev

                Comment


                • #9
                  string\match() is your solution and definitely it is possible to get it done
                  Rabii
                  Web Dev

                  Comment


                  • #10
                    Will try it (probably all night to figure out) and THANKS alot

                    Comment


                    • #11
                      It is possible, I haven't done it for WYSIWYG yet, but here is a formula I use to do "Search in email" and "link it to my Case". You can test it in Sandbox and see what you need to search for and how to get the result to return to "true"
                      Code:
                      $findrecord = record\findOne('Case', 'mattercaseID', 'desc', 'mattercaseID=', string\substring(subject, 0, 5)); // 'desc' is Descending, must have this field
                      ifThen(
                          entity\isNew = true && fromAddress == 'noreply@espocrm.com' && $findrecord != null,
                          parentType = 'Case'; parentId = $findrecord
                          );​

                      Comment

                      Working...
                      X