Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ablity to Create and Select Additional Fields in the Registration Form #100

Open
360fusion opened this issue Jun 1, 2023 · 1 comment

Comments

@360fusion
Copy link

It would be great if you could have an area to create new fields and then when adding an event select which of those fileds to use for that specific event.

This way you could request more information like job title, dietry requirements etc.

If there were simple tokens so these could be added to emails and also exported into a csv or xls doc that would be great.

@pepperbilly
Copy link

pepperbilly commented Jul 22, 2023

i have the same request need at least one more field for phone number.

So i Modified the Module as followed:

dca/tl_calendar_events_subscription.php

Moddified:
//Palettes
'guest' => '{type_legend},type,addedBy,numberOfParticipants,disableReminders;{guest_legend},firstname,lastname,email, phone',

Added:

 'phone'        => [
            'label'     => &$GLOBALS['TL_LANG']['tl_calendar_events_subscription']['phone'],
            'exclude'   => true,
            'inputType' => 'text',
            'eval'      => ['mandatory' => true, 'rgxp' => 'phone', 'decodeEntities' => true, 'tl_class' => 'w50'],
            'sql'       => "varchar(255) NOT NULL default ''",
        ],

languages/xx/default.php
((as requiered))

languages/de/tl_calendar_events_subscription.php
((as requiered))

src/Codefog/EventSubscriptions/Exporter.php
Added:
'subscription_phone' => $headerFields['subscription_phone'],

src/Codefog/EventSubscriptions/DataContainer/SubscriptionContainer.php
Modified:
->prepare("SELECT * FROM tl_member WHERE id=? OR (id NOT IN (SELECT member FROM tl_calendar_events_subscription WHERE type=? AND pid=?)) ORDER BY lastname, firstname, username, phone")

$members[$group][$records->id] = $records->lastname.' '.$records->firstname.' ('.$records->username.') '.$records->phone.'';

src/Codefog/EventSubscriptions/Subscription/GuestSubscription.php
Added:
'subscription_phone' => $this->subscriptionModel->phone,

src/Codefog/EventSubscriptions/Subscription/MemberSubscription.php
Added:
'subscription_phone' => $member->phone,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants