This question has been flagged
1 Reply
4148 Views

I want a string like "%%a - Abbreviated Week name" to be put onto form view

but when I enter that: does not work in version 6.1

I fear that its the problem of regular expression.

Avatar
Discard
Best Answer

You need to escape % character as it is used for variable substitution. Use %% for each required character. Your string should be %%%%a - Abbreviated Week name.

Update:

Apparently, the question was not clearly writtten. As per the comment below, luis may want to to show dynamic week name in the view.

If you want to display dynamic data, you have 3 options:

  1. Include it as a functional field in the model.
  2. Dynamically modify the view by overriding fields_view_get().
  3. Write web client addon.
Avatar
Discard
Author

Thank you very much for your answer Mohammed, I try but it just return the literal text:

                 %%a - Abbreviated Week name
I put it this way:
 <label srtring="%%%%a - Abbreviated Week name" />

Am I doing something wrong?

Yes, You get a literal % character for each %%. That was how I understood you questions; How to display literal %? I update the answer in view of your comment.