How to populate current date in an LBF form field Text-date

I have an LBF called prescription where I have the Medicine and its schedule. How to populate current date in this LBF form in a field Text-date? I see that the built in clincal Notes form has this date field. With out selecting the date from the date picker, the current date is displayed in the Clincal notes form

You can create a plugin that will populate the form with the date when the form is opened.
This is how to create a plugin. You will want to use the onload. Name the function this way.

function LBFCOWS_javascript_onload() 
         echo " 
                   //Javascript here to populate the date field.

Hello !
I’ve been looking something similar to attach prescription to encounters, could you comment some about how did you get it?

1 Like

I created an LFB form adding the necessary fields.
Customizing OpenEMR For Your Practice Using Layout Based Forms - YouTube. This youtube video was helpful

1 Like

I have been wondering about something similar.

You were able to attach prescriptions to encounter notes in an LBF?

Was thinking of displaying prescriptions in an encounter note with date and time displayed.

That’s just I need ! I’ve did some variant using Care Plan inserting medication prescripcion into DESCRIPTION field, so once printed entire encounter including those meds are at same page

BUT I those meds are prescribes manually so I can’t analize that info as I’d use RxCUI tables.

Any advice?