• Resolved Graicifyd

    (@graicifyd)


    Please could you help me with the css to break the words into next line so that everything can be in the box when the window is adjusted?

    As at now the text stay on just a line, I have tried all of these

    word-break: break-all !important;
        white-space: normal !important;
     word-break: break-word !important;
     text-align: justify !important;
    word-wrap: break-word !important;

    but none of them worked, I added them to ‘custom keyword I used for all the columns which is .table input{ }

    Thank you for your support.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    That is not possible. You’ve generated the table with calculated fields. The calculated fields use input tags, and the input tags do not accept word-break or similar. In the input tags, you can insert only one line (HTML standard).

    The alternative would be to use the calculated fields as auxiliary but display the result in another field.

    For example, if you have insert an “HTML Content” field in the form with a real table tag:

    
    <table>
    <tr>
    <td class="result-1"></td>
    <td class="result-2"></td>
    </tr>
    </table>
    

    And you have two calculated fields with the equations: fieldname1+fieldname2 and fieldname3+fieldname4 (the fields’ names and the equations are hypothetical, only to describe the process).

    You can edit the equations as follows:

    
    (function(){
    var result = fieldname1+fieldname2;
    jQuery('.result-1').html(result);
    return result;
    })()
    

    and

    
    (function(){
    var result = fieldname3+fieldname4;
    jQuery('.result-2').html(result);
    return result;
    })()
    

    Finally, you can hide the calculated fields by ticking a checkbox in their settings because they are being used as auxiliaries.

    Even, if you don’t need to submit these values by separated, you can implement all the process with only one calculated field:

    
    (function(){
    var result1 = fieldname1+fieldname2,
        result2 = fieldname3+fieldname4;
    jQuery('.result-1').html(result1);
    jQuery('.result-2').html(result2);
    })()
    

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Thank you so much, you are amazing.

    Thread Starter Graicifyd

    (@graicifyd)

    I have been able to effect the table here thank you. Would I be able to include a symbol to be displayed at the end in this code as it appears in regular calculated field?

    For example, I have this formula:

    (function(){
    var result = PREC(fieldname30,0);
    jQuery('.result-1').html(result);
    return result;
    })()

    How can I include a ‘g’ symbol at the end to have something like ‘3 g’?

    Thank you for your support.

    Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    You should include the symbols as part of the equation:

    
    (function(){
    var result = FLOOR(fieldname30);
    jQuery('.result-1').html(result+' g');
    return result;
    })()
    

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Thanks, you are awesome!

    Thread Starter Graicifyd

    (@graicifyd)

    Please one more thing, how can I make the result appear in a bracket? For example:

    (23)

    I tried this:

    (function(){
    var result = PREC((fieldname46*(0.4/4)),2);
    jQuery('.result-60').html((result))+' kg');
    return result;
    })()

    but I didn’t get it right.

    Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    No, the parenthesis must be between single or double quotes to transform them in texts:

    
    (function(){
    var result = PREC((fieldname46*(0.4/4)),2);
    jQuery('.result-60').html('('+result+' kg)');
    return result;
    })()
    

    Best regards.

    • This reply was modified 4 years ago by codepeople.
    Thread Starter Graicifyd

    (@graicifyd)

    Amazing, thank you so muck.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CSS FOR WORD WRAP’ is closed to new replies.