2
votes

I have seen extension with flexform where an input field is for entering an URL (example: gkh_rss_import). After the input field there is an URL selector. When pressing it the default TYPO3 selection pops up with URL to internal page, external, image etc.

But in the xml for the flexform I see only the code for a normal input field, not an URL selector.

So I guess the URL selector somehow is added outside the flexform xml. But how?

1

1 Answers

11
votes

This is done through an additional <wizards> node for the input element in FlexForm XML:

<config>
  <type>input</type>
  <eval>trim</eval>
  <size>60</size>
  <default></default>
  <wizards type="array">
    <_PADDING type="integer">2</_PADDING>
    <link type="array">
      <type>popup</type>
      <title>Link</title>
      <icon>link_popup.gif</icon>
      <script>browse_links.php?mode=wizard</script>
      <JSopenParams>height=500,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
    </link>
  </wizards>                
</config>

You can find details about the available wizards and their configuration options in doc_core_tca, section "Additional $TCA features" (under headline "browse_links.php"). This is all about PHP arrays, but FlexForm XML is just another way to store the same configuration data.

Cheers, Jörg.