Link to home
Start Free TrialLog in
Avatar of dsg138
dsg138

asked on

Populate text boxes with template / short codes

Experts,
I'm writing a page for doctors and nurses to enter some notes about a recent patient visit.  While we initially though we could use drop down boxes to help automate the population of text boxes, the users (clinical staff) are asking if "short codes" are a possibility.  I guess this would be similar to how WordPress uses short codes.

For example:  In the large text box that says "Diet Recommendations", instead of typing this paragraph 20 times a day:
"Patient should follow a low-carb diet and avoid foods containing sugar."

The user would simply like to type something like [diet.lc].
Then the paragraph above would be displayed.

Are there any plugins or existing scripts that would make this less difficult.  I'm not even sure where to begin here.

Any feedback or suggestions would be welcome.

-dsg
SOLUTION
Avatar of Ess Kay
Ess Kay
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
to make it quicker,  you can use regular expression to find anything between the [ ]
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dsg138
dsg138

ASKER

Thank you.  This is exactly the advice I was looking for!  Appreciate the help!
-Dan