You are viewing limited content. For full access, please sign in.

Question

Question

Handling RTL Forms

asked on November 15, 2016 Show version history

Dear All ,

i have two questions ...

First : how to make forms to be aligned from right to left ??
i am working on Arabic Forms ...and i had already changed the fields label but not the field itself using CSS 

*{
direction : rtl;
}

but while i am trying to use margin property to move the fields, it caused many conflicts in the mobile and other screens ...

Second question
 after creating the form ...can i get the Form Code ( in Java or C#  + HTML) i think it will be easier to change or handle the Form from the code itself  
 

0 0

Replies

replied on November 15, 2016

Hi Kareem, may I ask which version of Forms are you using? 

 

Did you set your browser's locale to Arabic? If your browser language is set to Arabic, maybe you could try below code in CSS section on CSS&Javascript tab of Forms designer.

*[dir="rtl"] .label-right .cf-label {
	text-align: right;
}

If you are designing an Arabic Form in a browser with English locale (left-to-right language), maybe you could try below code.

*[dir="ltr"] .label-left .cf-label {
	text-align: right;
}

The code suggested is to change only the labels of the fields to be right-aligned. Let me know whether it works.

0 0
replied on November 17, 2016

Hi Ming ...thanks for your reply ...i am using forms version 10 
and i already tried these code before but in vain  

0 0
replied on November 17, 2016

Hi Kareen, may you try to put the code after all the other CSS code in CSS section? So that no other CSS code will overwrite this one. The examples below are based on Forms version 10.0.

 

If the browser settings language is set to Arabic, the left align

, right align

.

 

If the browser is set to English, left align

, right align

.

 

Let me know if this is the what you expected, or there's something else you are expecting? and if it works after you put the CSS code after all other CSS code? If there's something else you are expecting, can you provide me some screenshots about the expected behavior of the field labels?

 

Question 2, after creating the form, everytime when you preview/fill the form, it's dynamically generated from the server (backend), so you will not be able to modify the form before or when it's generating. After it's generated, the source code you can find through ctrl+R in chrome (or right click the page, select view source). If you wanna make changes after it's loaded but before displaying, 

1. fill a form through submission, maybe take a look at form.js (InstallPath\Forms\js\form).

2. view a form, maybe take a look at PrintForm.cshtml, PrintFormLayout.cshtml, (InstallPath\Forms\Views\Form) printForm.js(InstallPath\Forms\js\form).

3. through the link of a published form, maybe take a look at _FormLayout.cshtml(InstallPath\Forms\Views\Form).

 

For example, my InstallPath is C:\Program Files\Laserfiche\Laserfiche Forms, so the js files are located at C:\Program Files\Laserfiche\Laserfiche Forms\Forms\js\form, and the cshtml files are located at C:\Program Files\Laserfiche\Laserfiche Forms\Forms\Views\Form in my computer. 

 

Let me know if I'm not clear or I didn't get your point correctly. 

0 0
replied on November 29, 2016

thanks for your reply and very sorry for being late to response ....

now all i wrote was 

*{
direction:rtl !important;
}

and also i changed my browser to Arabic as the default and in the Form setting i changed the form to aligned from right  ... but still the form not like from right to left 

here are some screenshots 

 

****************************************************************

****************************************************************

 

like the screenshot appear there are lots of space between the label and the field itself and if i tried to modify this by margins it will conflict with mobile screens and also it will not be good 


Regarding to the other question ... my point is or my question is can i create custom form from scratch to have full control over it ??

Thanks very much for your time 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.