- Posts: 1
- Thank you received: 0
Questions about Payment Form extension
How to dynamically fill a custom field
- Azhar Abbas
- Topic Author
- Offline
- New Member
-
Less
More
7 years 7 months ago #101334
by Azhar Abbas
How to dynamically fill a custom field was created by Azhar Abbas
Dear Admin
Please suggest how to fill the fields like textbox, combo box using session variable or dynamic data.
In short i will tell you my requirements - I am having article id in session variable based on that id i have to collect the data like Title, Package available for that id and rate based on the package. and these data should be prefilled in fields of the forms.
Waiting for an early reply.
Regards
Azhar Abbas
Please suggest how to fill the fields like textbox, combo box using session variable or dynamic data.
In short i will tell you my requirements - I am having article id in session variable based on that id i have to collect the data like Title, Package available for that id and rate based on the package. and these data should be prefilled in fields of the forms.
Waiting for an early reply.
Regards
Azhar Abbas
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
7 years 7 months ago #101370
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to dynamically fill a custom field
Hi Azhar
Right now, the only way is editing the code. You will need to look at the file components/com_pmform/View/Form/Html.php. You will see that there is a variable called $data. That variable is an array store the values which will be used to fill-in form field in key => value format
So if you want to prefill value for a field called name_of_field for example, then using the code like this
$data = 'The value you want';'
After that, that field will be pre-filled by the value you set in $data array
Regards,
Tuan
Right now, the only way is editing the code. You will need to look at the file components/com_pmform/View/Form/Html.php. You will see that there is a variable called $data. That variable is an array store the values which will be used to fill-in form field in key => value format
So if you want to prefill value for a field called name_of_field for example, then using the code like this
$data = 'The value you want';'
After that, that field will be pre-filled by the value you set in $data array
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.