× Form Help

Edit options in Drop Down List

  • ante
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Thank you received: 0

ante replied the topic: Edit options in Drop Down List

Aha, I see. Thank you very much Mihaela for all your support. I really appreciate it.

Best Regards,
Ante
#232508
  • Posts: 1465
  • Karma: 48
  • Thank you received: 194

mihaela replied the topic: Edit options in Drop Down List

Thank you for the kind words.

I'm glad I've helped. :)

Regards,

Mihaela
#232512
  • ante
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Thank you received: 0

ante replied the topic: Edit options in Drop Down List

Hello again Mihaela.

Sorry, I thought I was done but I realized one more thing.

In the editable textArea you helped me create, can I make sure that there is no blanks on rows?
For instance if a user add "my test" to one row, it will automagically be "my_test" upon submit. Also if there is an empty space at start OR end of line, that empty space should be removed. " my test " -> "my_test"

Best,
Ante
#232515
  • Posts: 1465
  • Karma: 48
  • Thank you received: 194

mihaela replied the topic: Edit options in Drop Down List

Hello again,

What you want to do is achievable.

To remove the empty spaces at beginning and end of each line and to replace the spaces between words in a line with '_' you have to changethe code in End Submit.

So, go to form's Advanced properties > More options > Submit pieces and in End Submit section replace this piece of code:
foreach(preg_split("/((\r?\n)|(\r\n?))/", $test) as $line){
    $opts.= "0;". $line .";". $line ."\n";
}
with this one:
foreach(preg_split("/((\r?\n)|(\r\n?))/", $test) as $line){
    $line = trim($line);
    $line = str_replace(' ', '_', $line);
    $opts.= "0;". $line .";". $line ."\n";
}
Actually, you have to add two lines of code.

Let me know whether after you do this everything works as wanted.

Regards,

Mihaela
#232561
  • ante
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Thank you received: 0

ante replied the topic: Edit options in Drop Down List

Wow. Works perfect. Thanks.

Best regards,
Ante
#232600
  • Posts: 1465
  • Karma: 48
  • Thank you received: 194

mihaela replied the topic: Edit options in Drop Down List

Hello again,

I'm glad I've helped and that it works for you.

Regards,

Mihaela
#232605
Moderators: ForumSupporttomeperica
Time to create page: 0.057 seconds

New Support System

Dear Customers,

Users with active subscription have support priority which will be dona via ServiceDesk (My Account > Raise a ticket).
FREE Support topics will be answered when AND if there is time.

You can check support guidelines here : here

Regards,
Crosstec Team

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99€

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here