TextHint and Hint properties

I am having some issues. Maybe its my understanding.

I have a few TWebEdits with the html having a default placeholder.

I then use Delphi to change Hint and TextHint.

  • Hint changes the first time I set it - it reflects in the title attribute.
  • Hint doesnt change the second time I change it.
  • TextHint never updates the placeholder. The original html's placeholder is visible.

Fragment of the form below, I need to change the placeholder and title whenever the "radio buttons" is pressed.

The code is

procedure TCoordinate_Validator.Set_Coordinate_Format
          (AFormat : TCoordinate_Format);
begin
  FFormat := AFormat;

  case FFormat of
    cf_DD :
    begin
      if Assigned(Fedt_Lat)
      then begin
           Fedt_Lat.TextHint := '40.445';
           Fedt_Lat.Hint     := 'DD.DDD format (e.g., 40.445)';
      end;
      if Assigned(Fedt_Lng)
      then begin
           Fedt_Lng.TextHint := '-74.010';
           Fedt_Lng.Hint     := 'DD.DDD format (e.g., -74.010)';
      end;
    end;

    cf_DDMM :
    begin
      if Assigned(Fedt_Lat)
      then begin
        Fedt_Lat.TextHint := '40 26.7';
        Fedt_Lat.Hint     := 'DD MM.M format (e.g., 40 26.7)';
      end;
      if Assigned(Fedt_Lng)
      then begin
        Fedt_Lng.TextHint := '-74 00.6';
        Fedt_Lng.Hint     := 'DD MM.M format (e.g., -74 00.6)';
      end;
    end;

    cf_DDMMSS:
    begin
      if Assigned(Fedt_Lat)
      then begin
           Fedt_Lat.TextHint := '40 26 42';
           Fedt_Lat.Hint     := 'DD MM SS format (e.g., 40 26 42)';
      end;
      if Assigned(Fedt_Lng)
      then begin
           Fedt_Lng.TextHint := '-74 00 36';
           Fedt_Lng.Hint     := 'DD MM SS format (e.g., -74 00 36)';
      end;
    end;
  end;

  Clear_Existing_States;
  Set_Format_Button_State(FFormat);
  
  // Re-validate existing content with new format
  if Assigned(Fedt_Lat) and (Trim(Fedt_Lat.Text) <> '')
  then Validate_Coordinate(Fedt_Lat, 'lat');
  if Assigned(Fedt_Lng) and (Trim(Fedt_Lng.Text) <> '')
  then Validate_Coordinate(Fedt_Lng, 'lng');
end;

I also have an issue with edt.Text. In the button click event, It always shows blank instead of what user has typed in.

Fixed everything except the Hint (title). That doesn't get updated, when changed.

Is it a browser issue or is TMS Webcore not updating it the 2nd time. if the latter, will updating the DOM directly fix it?

The issue was with my class code - Earlier I was creating all controls inside and setting the IDs. These IDs were different to what was in the html, this breaking the controls. I have removed that not-used code now.

I cannot see any problem.
WebEdit1 mapped onto a HTML element in the template via the ID and the code:

procedure TForm1.WebButton1Click(Sender: TObject);
begin
  webedit1.hint := 'in code';
end;

and this updates the hint on the INPUT element.

Please isolate & provide sufficient details to allow us to reproduce such issue.