Good day; I am busy with my first Drupal project ever ( http://www.awksurvey.co.za )
This is a survey that I have developed with WebForm and have translated it to Afrikaans ( my home language )

In order to achieve left indentations for my labels eg 1.2 then 1.2.1 and 1.2.2 should be indented. I achieved this by placing some   tags in front of the labels and the English (language=en) survey presents 100% when I change my URL to language=af all the   tags are not rendered as html tags and my for shows   literally and when I view the source I see  

I have tried many solutions and even broke my site once by trying to change the htmlspecialchars code in includes/bootstrap.inc.

Your help will be so much appreciated.

Thank you kindly and warm regards.
Christopher

Comments

vm’s picture

I achieved this by placing some tags in front of the labels

what tags?

couldn't the text-indent property in css be used?

ChristopherVanHeerden’s picture

Hello VM.

I placed     tags to get the spacing in front of the text which is a MARKUP type form component. The

tags are inserted by TinyMCE:
1.2 Plaas / Erf / Titelakte *
1.2.1 Plaas no. / Erf no. / Titel akte no. *

      Alle ander titel akte besonderhede kan aan die einde van die data-opname ingevul word

1.3 Besonderhede van Eienaar / Hoof Uitvoerende Beampte / Voorsitter
1.3.1 Amptelike titel: *

I added the JS code in a MARKUP component just before the page-break:

<script type="text/javascript">

doclabs = new Array;
doclabs = document.getElementsByTagName('label');
if (doclabs.length) {
  for (i=0; i<doclabs.length; i++ ){
    labtext = doclabs[i].innerHTML;
    var n= labtext.replace(/&amp;nbsp;/g,"&nbsp;");
    var k= n.replace(/&lt;p&gt;/g,"<p>");
    var l = k.replace(/&lt;\/p&gt;/g,"</p>");
    var m = l.replace(/&lt;sup&gt;/g,"<sup>");
    var o = m.replace(/&lt;\/sup&gt;/g,"</sup>");
    var p = o.replace(/&lt;strong&gt;/g,"<strong>");
    var q = p.replace(/&lt;\/strong&gt;/g,"</strong>");
    var r =q.replace(/&lt;span&gt;/g,"<span>");
    var s =r.replace(/&lt;\/span&gt;/g,"<span>");
    doclabs[i].innerHTML =s;
  }
}
</script>

to get most of the type /&nbsp;/g," " tags removed succesfully.....I actually think replying to you has given me the solution to my markup not being altered :D... In the code above I get all labels doclabs = document.getElementsByTagName('label'); but not the

components/elements. Checking this now.

Will get back to you if it worked.

Thank you.