Skip to main content

Widget Type

  • December 15, 2023
  • 2 replies
  • 1 view

Is there a way to know a FRM Widget type of a field on runtime? I would like to be able to set some properties on runtime if the widget type is uHTML 



------------------------------
Yuen Chong
Mrs
Rocket Forum Shared Account
------------------------------

2 replies

Forum|alt.badge.img
  • Participating Frequently
  • December 21, 2023

Is there a way to know a FRM Widget type of a field on runtime? I would like to be able to set some properties on runtime if the widget type is uHTML 



------------------------------
Yuen Chong
Mrs
Rocket Forum Shared Account
------------------------------

Hi,

I think about two solutions :

The quick:

$fieldhandle(uhtml)->$widgetoperation("js:test")

If status=0 it's an html widget 

("test"  javascript function may not exist) 

The corporate :

Define an constant value to identify your widget ( in a widget template , or entity ...)

Gilles.



------------------------------
Hortion Gilles
Dedalus Healthcare France
Artigues Pres Bordeaux FR
------------------------------

Iain Sharp
Forum|alt.badge.img+5
  • Inspiring
  • December 21, 2023

Hi,

I think about two solutions :

The quick:

$fieldhandle(uhtml)->$widgetoperation("js:test")

If status=0 it's an html widget 

("test"  javascript function may not exist) 

The corporate :

Define an constant value to identify your widget ( in a widget template , or entity ...)

Gilles.



------------------------------
Hortion Gilles
Dedalus Healthcare France
Artigues Pres Bordeaux FR
------------------------------

Yeah, I work with Yuen, and we are going with writing a program to check the repository and add a property of "ISHTML=T" to the properties of the widgets based on the settings in UXFIELD and UCFIELD, (or manually by the developer) but we were hoping for something a little more "built in". 

We have global procs which change field attributes based on user permissions, but we have discovered making the HTML widget 'dim' renders it dysfunctional so we are trying to implement a system wide change which can recognise HTML fields, and skip the code. 

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------