[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

How to set a table (fields) to not-editable?

On the Form there is a radio button (among others) that can be set to YES or NO.
Below this button is a table (Subform) which should be editable when the user select YES.
But the table should be not-editable when the user select NO.

When I knew in advance what the user select it would be easy because I could create another Subform.
But in this case the Form is opened with an editable table and if the selection NO, the table should turn to a not-editable table.
Does anybody know how to do it?
  • 5
  • 4
1 Solution
Sjef BosmanGroupware ConsultantCommented:
Do you mean you have many fields in a table in your form, each table cell has a field? Set the property of the YES/NO-field to Refresh fields on keyword change, and use the value of the YES/NO field in the hide-whens of the whole table.
didier20Author Commented:
Yes, the table has lots of fields.

I set the radio button field properties to "Refresh fields on keyword change"
The fields in the table (in the cells) has the following hide when formula: matrel="N"
matrel is the radio button field name.
But it doesn't work, the field in the cell isn't hided even if I save the form.

I guess there is something wrong with the "hide formula"
I've already tried this:
Field matrel := rb;

didier20Author Commented:
By the way: How can I give the radio button a default value?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Sjef BosmanGroupware ConsultantCommented:
What are the options you have for the radio button? If you have
    Yes | Y
    No | N
or anything like that, then set the default value of the radio button as "N" (and NOT a plain N, which would mean the field with the name "N"!).

Fields do NOT have a hide-when formula... Paragraphs do, and a table cell is one or more paragraphs, depending on the number of newlines you entered in the cell. The hide-when formula could just be
didier20Author Commented:
But on the radio button there is no option like: Set the default value.
I want to set the default with "N" but where?

The hide formula doesn't work till now but I will try later again.
Sjef BosmanGroupware ConsultantCommented:
Pardon? It is not an option, if that's what you're looking for. In the Designer, you don't have a place to set the Default Value? Must be there... where all default formulas are to be entered for fields.
didier20Author Commented:
Sorry, I thought it is on the Field's property window.
I set following when it didn't work:
Not Related |"N"

But now it's ok, even the hiding.
I only wanted to hide the fields and leave the table (frame/cells) there.
Is it possible?
Sjef BosmanGroupware ConsultantCommented:

Leave the cells visible? If your hide-when formulas hide all cells of a row, the row will be hidden. I have the following ideas about this:
1) add in every cell a newline, so create a second paragraph in each cell; make the hide-when formula for this empty line the logical inverse of the cell's hide-when formula (which same as paragraph's hide-when).
2) do the same, but only for 1 cell per row
3) add a column that's always visible, i.e. without a hide-when formula, e.g. with a space or a line number in it

If option 3 isn't suitable, then try 2.
didier20Author Commented:
It works.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now