Skip to content

Conversation

@brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Jul 7, 2023

Summary of Changes

Adds the ability to have a header in the generated dropdown list as per the documentation https://docs.joomla.org/SQL_form_field_type

Testing Instructions

Create an sql custom field with a simple query eg select a.id as value, a.title as text from uajp8_content as a

Actual result BEFORE applying this Pull Request

Open an article and check the new field - it will be a dropdown list with the first item in the list displayed.
As a result when you save the article that first item will be saved and will therefore be displayed on the front end.

Expected result AFTER applying this Pull Request

There is now an additional param in the field called Header
You can use this to add a header to the dropdown list that has no value eg "- Select something -"
Open an article and check the new field - it will be a dropdown list with the first item in the list being the content you entered in the header field.
As a result when you save the article the field will have no value and will therefore not be displayed on the front end.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-5.0-dev labels Jul 7, 2023
@Quy
Copy link
Contributor

Quy commented Jul 14, 2023

I have tested this item ✅ successfully on fc0dbb2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41122.

@brianteeman
Copy link
Contributor Author

Would be great to get some testers here as there were a lot of people asking for this field

@HLeithner HLeithner merged commit fec8dc9 into joomla:5.0-dev Jul 23, 2023
@HLeithner
Copy link
Member

thanks

1 similar comment
@brianteeman
Copy link
Contributor Author

thanks

@brianteeman brianteeman deleted the sql_field branch July 23, 2023 19:31
heelc29 added a commit to heelc29/joomla that referenced this pull request Aug 13, 2023
GeraintEdwards pushed a commit to GeraintEdwards/joomla-cms that referenced this pull request Aug 14, 2023
* [5.x] SQL field plugin

* added to the plugin params - n0ot sure why but done for consistency
GeraintEdwards pushed a commit to GeraintEdwards/joomla-cms that referenced this pull request Aug 14, 2023
* [5.x] SQL field plugin

* added to the plugin params - n0ot sure why but done for consistency
@Razzo1987 Razzo1987 mentioned this pull request Jan 30, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants