[beta 4.0.4] rbf_showOrHideField()

Posted by Meryk on 09-Dec-2015 11:02

Hello,

I tried rbf_showOrHideField() in beta 4.0.4. It is working fine, but here is how it is behaving : (I am hiding field 'Salutation').

So before Hide :

And After Hide :

Basically field 'Home Phone' that was on the right column is jumping to the left one, leaving a space.

Is that what we should expect from this function ? 

Thank you

Meryem

Posted by Thierry Ciot on 10-Dec-2015 11:43

For V4.0.5, We have added an optional parameter to this function to let end user controls the responsive behavior when the field is hidden.

The function signature is now: rbf_showOrHideField(fieldName, showField, doNotHideResponsiveColumn)

Where:

doNotHideResponsiveColumn: optional argument - when does not exist, we default to doNotHideResponsiveColumn = false

doNotHideResponsiveColumn = true, we hide only what's inside the responsive column (thus maintaining an element at position occupied by content so that the next responsive column does not come on the one being hidden)

doNotHideResponsiveColumn = false, we hide the responsive column, thus the next responsive column will take its place.

Thierry.

All Replies

Posted by Thierry Ciot on 09-Dec-2015 21:43
Yes this is to be expected because the Bootstrap responsive column element is hidden/shown with this function.  As a result, when you hide a responsive column the next responsive column will take its place (in other words,  it is as if you didn’t have the responsive column at all in the responsive row).  You have to consider the various screen size to see the effect.  Below is an example.  We can provide a different behavior (See response below – sorry for the long response but I thought visual example would be better at explaining than words J).
 
In the 4 screenshots below, the  example is a section designed with 4 columns.  We call the function to hide the field called Checkbox.
 
Before hiding:
 
After hiding – large screen:
 
After hiding – medium screen:
 
After hiding – small screens:
 
 
The alternate behavior we can implement is illustrated with the screenshots below.  Essentially, we can implement it by hiding the content of the responsive column instead of the responsive column itself (we could let you specify the behavior by adding an optional third parameter - function rbf_showOrHideField(fieldName, showField, doNotHideResponsiveColumn) ).
 
Field hidden – large screen
 
Field Hidden – medium screen
 
Let us know what you think.
 
Thanks. Thierry.
 
Posted by Mohammed Siraj on 10-Dec-2015 00:17

Also, this behavior is consistent with Classic UI.

Posted by Thierry Ciot on 10-Dec-2015 11:43

For V4.0.5, We have added an optional parameter to this function to let end user controls the responsive behavior when the field is hidden.

The function signature is now: rbf_showOrHideField(fieldName, showField, doNotHideResponsiveColumn)

Where:

doNotHideResponsiveColumn: optional argument - when does not exist, we default to doNotHideResponsiveColumn = false

doNotHideResponsiveColumn = true, we hide only what's inside the responsive column (thus maintaining an element at position occupied by content so that the next responsive column does not come on the one being hidden)

doNotHideResponsiveColumn = false, we hide the responsive column, thus the next responsive column will take its place.

Thierry.

Posted by Meryk on 11-Dec-2015 11:37

Hi Thierry,

Thank you for this !

We are actually implementing our responsiveness function so this might need some more discussions as per what  we are keeping or not. I am saying that cause we were under the impression that you are going to provide some API/ function to specify which responsiveness we want to apply, vertical or horizontal.

Can you tell us more about this as we brought the matter of responsiveness here. :)

I will get back to you on the rbf_showOrHideField question later.

Thanks !

Meryem

Posted by Thierry Ciot on 11-Dec-2015 15:12
Vertical vs horizontal is planned for V4.1
If I can get to it earlier and it does not have too many side effects, it will potentially ship earlier.
 
This thread is closed