Multi-Update: Hide checkboxes (but enable all visible fields by default)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
konfuzion
User
Posts: 378

Multi-Update: Hide checkboxes (but enable all visible fields by default)

Post by konfuzion »

Multi-Update is quite flexible but I want to restrict it like a normal form for a end-user to just select values and submit. I don't want to confuse them with checkboxes next to each field.

After admin finishes the form design, is there a way to HIDE the [_] SELECT ALL and CHECKBOXES beside each field? And by default just have them CHECKED?

Example
ADMIN designs the form:

[_] SELECT ALL
[_] This_Record_Id = 6
[_] Copy to Table <SELECT DROPDOWN>

[UPDATE]

USER SEES SIMPLE VERSION:

This_Record_Id = 6
Copy to Table <SELECT DROPDOWN>

[UPDATE]

and USER just selects the table name from the select dropdown and clicks update to copy it over


ahad
User
Posts: 22

Post by ahad »

// Page Load event
function Page_Load() {
//echo "Page Load";
$CurrentUserRole = $GLOBALS["Security"]->CurrentUserLevelID();

if ($CurrentUserRole == 7){ // user level id
$this->your field->ReadOnly = TRUE;
Try this


konfuzion
User
Posts: 378

Post by konfuzion »

[_] SELECT ALL
[_] This_Record_Id = 6
[_] Copy to Table <SELECT DROPDOWN DISABLED>

[UPDATE]

Using $this->your field->ReadOnly = TRUE;
I still see the empty CHECKBOXES and and now can't even click SELECT to choose the table from dropdown menu (it is greyed out, disabled).

The only method I can think of is it to use jquery to check all boxes onload, and then lock it and not allow the user to disable/uncheck the checkboxes
Can server events / multi-update do this? Or must use jquery?

Ideally it should be like this:

[X] SELECT ALL
[X] This_Record_Id = 6
[X] Copy to Table <SELECT DROPDOWN DISABLED>

[UPDATE]

but I want to hide the enabled checkboxes and prevent user from accidentally disabling/unchecking:

This_Record_Id = 6
Copy to Table <SELECT DROPDOWN>

[UPDATE]

konfuzion
User
Posts: 378

Post by konfuzion »

alternatively, can Multi-Update server event disregard whether checkbox is checked or not [_]/[X] and still process the action?
Then I can just tell user to ignore the checkboxes and just select which folder you want to copy to then click update.
Then use jquery to hide the checkbox fields.

If I have to tell them to check the checkboxes, I"m sure they will forget to do it from time to time, so I want to control the checkbox action and just process all whether or not user clicks [_]/[X]


mobhar
User
Posts: 11702

Post by mobhar »

System should give a warning message when end-users forgot to tick the Checkbox control that related to their desired field(s).


konfuzion
User
Posts: 378

Post by konfuzion »

If use jquery to check [X] first and then insert DISABLED attr so USER can't disable/uncheck it
will Muli-Page Server Event see it as enabled and process normally?


konfuzion
User
Posts: 378

Post by konfuzion »

no, if I check it and then add in attribute in the <INPUT ... DISABLED>
the failmessage pops up and says no field has been checked.

If I remove DISABLED and keep the checkbox checked then it goes through fine and edits the field value correctly.

I guess I'll just have to CHECK ALL onload and then use jquery/javascript to disable clicking on the checkbox so it always remains [X]


Post Reply